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:
Balaji Krishnamurthy
2025-09-04 20:57:31 +05:30
committed by GitHub
parent 40251d34ec
commit 7a999c8476
23 changed files with 344 additions and 264 deletions
@@ -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
}