fix(frontend): i18n reactive badges + fr-FR dates on detail/admin + FR footer (design-review)
- StatusBadge/SimulationStatusBadge: swap bare i18n.t() helper for
useTranslation() hook so badges re-render reactively on i18n init
- EngagementDetailPage: formatDate() on start_date/end_date/created_at
(was: raw ISO string, formatDateTime with noisy 00:00:00)
- UsersAdminPage: formatDate() on created_at column (was: raw ISO string)
- Layout footer: t('nav.footer') with FR string in fr.json
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import type { EngagementStatus } from '@/api/types';
|
||||
import { engagementStatusLabel } from '@/i18n/status';
|
||||
|
||||
const STYLES: Record<EngagementStatus, string> = {
|
||||
planned: 'bg-warn-soft text-warn border border-warn',
|
||||
@@ -8,13 +8,14 @@ const STYLES: Record<EngagementStatus, string> = {
|
||||
};
|
||||
|
||||
export function StatusBadge({ status }: { status: EngagementStatus }): JSX.Element {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<span
|
||||
className={`inline-flex items-center rounded-pill px-3 py-[6px] text-[14px] leading-[1.3] font-medium ${STYLES[status]}`}
|
||||
data-testid="status-badge"
|
||||
data-status={status}
|
||||
>
|
||||
{engagementStatusLabel(status)}
|
||||
{t(`status.engagement.${status}`)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user