Format date displayed in Releases section (#14183)
Closes #14177 I noticed a `formatDisplayDate` file being used in `twenty-website` and created the same one for `twenty-front` as well. Unit tests for the same have been added. <img width="1438" height="770" alt="image" src="https://github.com/user-attachments/assets/5aa6eef5-19c5-4108-bf3f-c582d0ca1b59" /> <img width="1275" height="785" alt="image" src="https://github.com/user-attachments/assets/20a87ba6-fca4-472c-a691-362901505303" /> --------- Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
committed by
GitHub
parent
40251d34ec
commit
7a999c8476
+5
-2
@@ -1,7 +1,10 @@
|
||||
import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { formatExpiration } from '@/settings/developers/utils/formatExpiration';
|
||||
import {
|
||||
formatExpiration,
|
||||
isExpired,
|
||||
} from '@/settings/developers/utils/formatExpiration';
|
||||
import { TableCell } from '@/ui/layout/table/components/TableCell';
|
||||
import { TableRow } from '@/ui/layout/table/components/TableRow';
|
||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||
@@ -64,7 +67,7 @@ export const SettingsApiKeysFieldItemTableRow = ({
|
||||
|
||||
<StyledTruncatedCell
|
||||
color={
|
||||
formattedExpiration === 'Expired'
|
||||
isExpired(apiKey.expiresAt || null)
|
||||
? theme.font.color.danger
|
||||
: theme.font.color.tertiary
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user