Skip to content

Commit

Permalink
ignore if there is no expirationMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanfbrito committed Sep 8, 2023
1 parent 53c31c6 commit b493a76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/servers/supportedVersions/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
3 changes: 2 additions & 1 deletion src/servers/supportedVersions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
sampleServerSupportedVersions,
} from './samples';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export type SerializedJWT<T> = string;

export type Dictionary = {
Expand Down Expand Up @@ -225,7 +226,7 @@ export const getExpirationMessageTranslated = (
...message?.params,
};

if (!message || !i18n) {
if (!message || !i18n || params.remaining_days > 15) {
return null;
}

Expand Down
9 changes: 1 addition & 8 deletions src/ui/components/ServersView/UnsupportedServer.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit b493a76

Please sign in to comment.