diff --git a/src/components/Accordion/Item.tsx b/src/components/Accordion/Item.tsx index eb93913f..a8346f6f 100644 --- a/src/components/Accordion/Item.tsx +++ b/src/components/Accordion/Item.tsx @@ -19,7 +19,12 @@ const AccordionItem = ({ summary, open, children }: AccordionItemProps) => { } }); - window.location.replace(`${location.pathname}#${encodeURI(summary)}`); + if (decodeURI(location.hash) === `#${summary}`) { + // Hash at the end disables ability to open automaticaly first FAQ item + window.location.replace(`${location.pathname}#`); + } else { + window.location.replace(`${location.pathname}#${encodeURI(summary)}`); + } }; useEffect(() => {