Skip to content

Commit

Permalink
fix(formattedDate): add tag to formattedDate
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Oct 25, 2023
1 parent 9a6bd56 commit d5d817b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions client/src/pages/homepage/components/last-updated.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ export default function LastUpdated() {
const { data, error, isLoading } = useLastUpdates();

if (!data) return null;
if (isLoading) return <p>Loading</p>;
if (isLoading) return <p>Chargement</p>;
if (error) return <p>Erreur</p>;
if (!data?.length) return null;

return (
<Container spacing="mb-6w">
<Row>
<Col>
<Title as="h2">
<Title as="h2" title="dernière mise à jour">
Dernières mises à jour
</Title>
</Col>
Expand All @@ -52,16 +53,17 @@ export default function LastUpdated() {
<CountryCard
title={fields.pays}
description={(
<>
<p title="Dernière mise à jour">
Mis à jour le
{' '}
<FormattedDate
value={fields?.submitdate}
day="numeric"
month="long"
year="numeric"
aria-labelledby="last-updates-heading"
/>
</>
</p>
)}
isoCode={fields.iso3}
/>
Expand Down

0 comments on commit d5d817b

Please sign in to comment.