From e1f2305db7aacf95f7d7f91cf03d140d0eff2109 Mon Sep 17 00:00:00 2001 From: YourivHDenHaag Date: Thu, 31 Oct 2024 11:30:46 +0100 Subject: [PATCH] fix: added missing locale changes --- components/Action/src/ActionDate.tsx | 8 +------- components/Card/src/Card/CaseCard.tsx | 10 +--------- components/Card/src/Card/SubjectCard.tsx | 2 +- components/ContactTimeline/src/ContactTimeline.tsx | 2 +- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/components/Action/src/ActionDate.tsx b/components/Action/src/ActionDate.tsx index 61c295f8b..b19729fd4 100644 --- a/components/Action/src/ActionDate.tsx +++ b/components/Action/src/ActionDate.tsx @@ -12,13 +12,7 @@ interface Props { labels?: FormatDateLabels; } -export const ActionDate = ({ - dateTime, - now = new Date().toISOString(), - relative = false, - locale = 'nl-NL', - labels, -}: Props) => { +export const ActionDate = ({ dateTime, now = new Date().toISOString(), relative = false, locale, labels }: Props) => { const [formattedDate, deadline] = formatDate({ dateTime, labels, relative, locale, now }); return ( diff --git a/components/Card/src/Card/CaseCard.tsx b/components/Card/src/Card/CaseCard.tsx index 23342f527..1f4806383 100644 --- a/components/Card/src/Card/CaseCard.tsx +++ b/components/Card/src/Card/CaseCard.tsx @@ -55,15 +55,7 @@ export interface CaseCardProps { /** * Primary UI component for user interaction */ -export const CaseCard = ({ - title, - subTitle, - date, - locale = 'nl-NL', - href, - active = true, - Link = BasicLink, -}: CaseCardProps) => { +export const CaseCard = ({ title, subTitle, date, locale, href, active = true, Link = BasicLink }: CaseCardProps) => { const classNames = clsx('denhaag-case-card', !active && 'denhaag-case-card--archived'); const dateTime = date ? new Date(date) : undefined; diff --git a/components/Card/src/Card/SubjectCard.tsx b/components/Card/src/Card/SubjectCard.tsx index 7c68e3ed8..ec795318d 100644 --- a/components/Card/src/Card/SubjectCard.tsx +++ b/components/Card/src/Card/SubjectCard.tsx @@ -47,7 +47,7 @@ export interface SubjectCardProps { /** * Primary UI component for user interaction */ -export const SubjectCard = ({ title, subTitle, date, locale = 'nl-NL', href, Link = BasicLink }: SubjectCardProps) => { +export const SubjectCard = ({ title, subTitle, date, locale, href, Link = BasicLink }: SubjectCardProps) => { const dateTime = date ? new Date(date) : undefined; return ( diff --git a/components/ContactTimeline/src/ContactTimeline.tsx b/components/ContactTimeline/src/ContactTimeline.tsx index 8668a751d..60c812aab 100644 --- a/components/ContactTimeline/src/ContactTimeline.tsx +++ b/components/ContactTimeline/src/ContactTimeline.tsx @@ -93,7 +93,7 @@ const ContactTimelineListItem: React.FC = ({ file, date, isoDate, - locale = 'nl-NL', + locale, sender = '', labels, channel,