Files
faunosteo/apps/app/src/components/admin/ModifiedDate.tsx
T
bchanot 423125c18f feat(app): search, sort, count and date on the official sheet list
Boards 28 and 29 A: name search with clear button and Escape, « Trier
par » (last modification by default, or name), a polite count line,
« Modifiée le … » on each row in a <time>, and the search no-result
block. The detail line moves to labels.ts as sheetDetails.

R-24: no existing assertion removed or rewritten; six tests added.
2026-11-16 17:03:08 +01:00

21 lines
695 B
TypeScript

import { formatShortParisDateTime } from '@/admin/labels'
import { useT } from '@/i18n/useT'
import { useLocaleStore } from '@/state/localeStore'
/**
* « Modifiée le 9 nov. 2026, 12:06 » (A8, Paris time), the whole phrase in a
* `<time>`: its value is re-serialised because a valid HTML time carries at
* most three fraction digits and the server sends six.
*/
export default function ModifiedDate({ iso }: { iso: string }) {
const t = useT()
const locale = useLocaleStore((s) => s.locale)
return (
<time dateTime={new Date(iso).toISOString()}>
{t('admin.sheets.modified').replace('{date}', () =>
formatShortParisDateTime(iso, locale),
)}
</time>
)
}