mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-28 21:06:27 -08:00
23 lines
648 B
TypeScript
23 lines
648 B
TypeScript
import type { ReactNode } from 'react';
|
|
import type { CryptoApi } from '$types/matrix-sdk';
|
|
import type { VerificationStatus } from '$hooks/useDeviceVerificationStatus';
|
|
import { useDeviceVerificationStatus } from '$hooks/useDeviceVerificationStatus';
|
|
|
|
type DeviceVerificationStatusProps = {
|
|
crypto?: CryptoApi;
|
|
userId: string;
|
|
deviceId: string;
|
|
children: (verificationStatus: VerificationStatus) => ReactNode;
|
|
};
|
|
|
|
export function DeviceVerificationStatus({
|
|
crypto,
|
|
userId,
|
|
deviceId,
|
|
children,
|
|
}: DeviceVerificationStatusProps) {
|
|
const status = useDeviceVerificationStatus(crypto, userId, deviceId);
|
|
|
|
return children(status);
|
|
}
|