mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-02-27 07:33:06 +01:00
25 lines
598 B
TypeScript
25 lines
598 B
TypeScript
|
import { ReactNode } from 'react';
|
||
|
import { CryptoApi } from 'matrix-js-sdk/lib/crypto-api';
|
||
|
import {
|
||
|
useDeviceVerificationStatus,
|
||
|
VerificationStatus,
|
||
|
} 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);
|
||
|
}
|