diff --git a/src/servers/supportedVersions/main.ts b/src/servers/supportedVersions/main.ts index 58bda1c85..25803927b 100644 --- a/src/servers/supportedVersions/main.ts +++ b/src/servers/supportedVersions/main.ts @@ -50,7 +50,7 @@ export function checkSupportedVersionServers(): void { (server) => server.url === action.payload.url && server.url === currentServerUrl ); - if (!server || !server.expirationMessage) return; + if (!server || server.expirationMessage === null) return; const { expirationMessage, expirationMessageLastTimeShown } = server; if (!expirationMessage) return; if ( diff --git a/src/servers/supportedVersions/types.ts b/src/servers/supportedVersions/types.ts index c379db94c..81f4f25a1 100644 --- a/src/servers/supportedVersions/types.ts +++ b/src/servers/supportedVersions/types.ts @@ -11,6 +11,7 @@ import { sampleServerSupportedVersions, } from './samples'; +// eslint-disable-next-line @typescript-eslint/no-unused-vars export type SerializedJWT = string; export type Dictionary = { @@ -225,7 +226,7 @@ export const getExpirationMessageTranslated = ( ...message?.params, }; - if (!message || !i18n) { + if (!message || !i18n || params.remaining_days > 15) { return null; } diff --git a/src/ui/components/ServersView/UnsupportedServer.tsx b/src/ui/components/ServersView/UnsupportedServer.tsx index f20875bee..652081407 100644 --- a/src/ui/components/ServersView/UnsupportedServer.tsx +++ b/src/ui/components/ServersView/UnsupportedServer.tsx @@ -1,11 +1,4 @@ -import { - Box, - Button, - ButtonGroup, - Icon, - Margins, - Skeleton, -} from '@rocket.chat/fuselage'; +import { Box, Button, ButtonGroup, Icon, Margins } from '@rocket.chat/fuselage'; import type { FC } from 'react'; import React from 'react'; import { useTranslation } from 'react-i18next';