diff --git a/src/components/layout/RowAccordion/index.tsx b/src/components/layout/RowAccordion/index.tsx index 395319d..7507e73 100644 --- a/src/components/layout/RowAccordion/index.tsx +++ b/src/components/layout/RowAccordion/index.tsx @@ -45,8 +45,8 @@ export default function RowAccordion({ data, placement='bottom' }: Props) { } }, [isInView]); - const getToPath = (link: { text: string; path: string }) => { - return link.path.includes("{id}") ? link.path.replace("{id}", link.text) : link.path; + const getToPath = (link: { text: string; path: string }, index: number) => { + return link.path.includes("{id}") ? link.path.replace("{id}", index.toString()) : link.path; } return ( @@ -98,8 +98,8 @@ export default function RowAccordion({ data, placement='bottom' }: Props) { )} {item.links && (
{item.content}