Device manager - scroll to filtered list from security recommendations (PSG-640) (#9227)
* scroll to filtered list from security recommendations * test sessionmanager scroll to * stable snapshot * fix strict errors * prtidy * use smooth scrolling
This commit is contained in:
parent
0d6a550c33
commit
54a66bd242
8 changed files with 201 additions and 91 deletions
|
@ -29,9 +29,13 @@ import {
|
|||
|
||||
interface Props {
|
||||
devices: DevicesDictionary;
|
||||
goToFilteredList: (filter: DeviceSecurityVariation) => void;
|
||||
}
|
||||
|
||||
const SecurityRecommendations: React.FC<Props> = ({ devices }) => {
|
||||
const SecurityRecommendations: React.FC<Props> = ({
|
||||
devices,
|
||||
goToFilteredList,
|
||||
}) => {
|
||||
const devicesArray = Object.values<DeviceWithVerification>(devices);
|
||||
|
||||
const unverifiedDevicesCount = filterDevicesBySecurityRecommendation(
|
||||
|
@ -49,9 +53,6 @@ const SecurityRecommendations: React.FC<Props> = ({ devices }) => {
|
|||
|
||||
const inactiveAgeDays = INACTIVE_DEVICE_AGE_DAYS;
|
||||
|
||||
// TODO(kerrya) stubbed until PSG-640/652
|
||||
const noop = () => {};
|
||||
|
||||
return <SettingsSubsection
|
||||
heading={_t('Security recommendations')}
|
||||
description={_t('Improve your account security by following these recommendations')}
|
||||
|
@ -69,7 +70,8 @@ const SecurityRecommendations: React.FC<Props> = ({ devices }) => {
|
|||
>
|
||||
<AccessibleButton
|
||||
kind='link_inline'
|
||||
onClick={noop}
|
||||
onClick={() => goToFilteredList(DeviceSecurityVariation.Unverified)}
|
||||
data-testid='unverified-devices-cta'
|
||||
>
|
||||
{ _t('View all') + ` (${unverifiedDevicesCount})` }
|
||||
</AccessibleButton>
|
||||
|
@ -90,7 +92,8 @@ const SecurityRecommendations: React.FC<Props> = ({ devices }) => {
|
|||
>
|
||||
<AccessibleButton
|
||||
kind='link_inline'
|
||||
onClick={noop}
|
||||
onClick={() => goToFilteredList(DeviceSecurityVariation.Inactive)}
|
||||
data-testid='inactive-devices-cta'
|
||||
>
|
||||
{ _t('View all') + ` (${inactiveDevicesCount})` }
|
||||
</AccessibleButton>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue