Device manager - logout current session (PSG-743) (#9275)

* trigger verification of other devices

* add sign out of current device section in device details

* fix classname

* lint

* strict type fix

* fix test

* improve mocked VerifReq
This commit is contained in:
Kerry 2022-09-14 14:37:36 +02:00 committed by GitHub
parent 41960b164b
commit f20d86b7b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 113 additions and 16 deletions

View file

@ -29,10 +29,14 @@ interface Props {
device?: DeviceWithVerification;
isLoading: boolean;
onVerifyCurrentDevice: () => void;
onSignOutCurrentDevice: () => void;
}
const CurrentDeviceSection: React.FC<Props> = ({
device, isLoading, onVerifyCurrentDevice,
device,
isLoading,
onVerifyCurrentDevice,
onSignOutCurrentDevice,
}) => {
const [isExpanded, setIsExpanded] = useState(false);
@ -51,7 +55,12 @@ const CurrentDeviceSection: React.FC<Props> = ({
onClick={() => setIsExpanded(!isExpanded)}
/>
</DeviceTile>
{ isExpanded && <DeviceDetails device={device} /> }
{ isExpanded &&
<DeviceDetails
device={device}
onSignOutDevice={onSignOutCurrentDevice}
/>
}
<br />
<DeviceVerificationStatusCard device={device} onVerifyDevice={onVerifyCurrentDevice} />
</>