fix: correct date formatting in VelocityMetrics component
- Updated date formatting in the `VelocityMetrics` component to ensure proper conversion of `week.weekStart` to a Date object before calling `toLocaleDateString`. This change improves the reliability of date display in the dashboard.
This commit is contained in:
@@ -91,7 +91,7 @@ export function VelocityMetrics({ velocity }: VelocityMetricsProps) {
|
|||||||
{week.totalActivities}
|
{week.totalActivities}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-xs text-[var(--muted-foreground)]">
|
<div className="text-xs text-[var(--muted-foreground)]">
|
||||||
{week.weekStart.toLocaleDateString('fr-FR', {
|
{new Date(week.weekStart).toLocaleDateString('fr-FR', {
|
||||||
day: 'numeric',
|
day: 'numeric',
|
||||||
month: 'short'
|
month: 'short'
|
||||||
})}
|
})}
|
||||||
@@ -117,7 +117,7 @@ export function VelocityMetrics({ velocity }: VelocityMetricsProps) {
|
|||||||
>
|
>
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<span className="text-sm font-medium">
|
<span className="text-sm font-medium">
|
||||||
Semaine du {week.weekStart.toLocaleDateString('fr-FR', {
|
Semaine du {new Date(week.weekStart).toLocaleDateString('fr-FR', {
|
||||||
day: 'numeric',
|
day: 'numeric',
|
||||||
month: 'short'
|
month: 'short'
|
||||||
})}
|
})}
|
||||||
|
|||||||
Reference in New Issue
Block a user