Skip to content

Commit

Permalink
fix: fragment key
Browse files Browse the repository at this point in the history
Signed-off-by: Maud Royer <[email protected]>
  • Loading branch information
jillro committed Jan 27, 2025
1 parent be3fd43 commit ab334fc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/(container)/glossaire/[letter]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { notFound } from "next/navigation";
import AlphabeticNav from "@/components/AlphabeticNav";
import sanitizeHtml from "sanitize-html";
import slugify from "slugify";
import { Fragment } from "react";

export const dynamic = "error";
export const dynamicParams = true;
Expand Down Expand Up @@ -57,7 +58,12 @@ export default async function Page(props: {
url={(letter) => `/glossaire/${letter}`}
/>
{definitions.map((definition) => (
<>
<Fragment
key={slugify(definition.Nom_glossaire as string, {
lower: true,
strict: true,
})}
>
<h2
className={fr.cx("fr-h6", "fr-mt-4w", "fr-mb-1w")}
id={slugify(definition.Nom_glossaire as string, {
Expand All @@ -77,7 +83,7 @@ export default async function Page(props: {
),
}}
/>
</>
</Fragment>
))}
</div>
</div>
Expand Down

0 comments on commit ab334fc

Please sign in to comment.