Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry Archibald committed Aug 11, 2022
1 parent 89002c7 commit b45ed8d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/views/settings/devices/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ limitations under the License.

import { DeviceWithVerification } from "./useOwnDevices";

// TODO put somewhere good when security card is merged
export enum DeviceSecurityVariation {
Verified = 'Verified',
Unverified = 'Unverified',
Expand All @@ -27,8 +26,8 @@ type DeviceFilterCondition = (device: DeviceWithVerification) => boolean;

export const INACTIVE_DEVICE_AGE_MS = 7.776e+9; // 90 days

export const isDeviceInactive: DeviceFilterCondition = device => !!device.last_seen_ts &&
device.last_seen_ts < Date.now() - INACTIVE_DEVICE_AGE_MS;
export const isDeviceInactive: DeviceFilterCondition = device =>
!!device.last_seen_ts && device.last_seen_ts < Date.now() - INACTIVE_DEVICE_AGE_MS;

const filters: Record<DeviceSecurityVariation, DeviceFilterCondition> = {
[DeviceSecurityVariation.Verified]: device => !!device.isVerified,
Expand Down

0 comments on commit b45ed8d

Please sign in to comment.