diff --git a/src/pages/kurzy/[slug]/index.tsx b/src/pages/kurzy/[slug]/index.tsx index 40f1777..9004475 100644 --- a/src/pages/kurzy/[slug]/index.tsx +++ b/src/pages/kurzy/[slug]/index.tsx @@ -115,12 +115,14 @@ const CourseDetailContent = ({ } } + setHasProductsInLocation(window.location.hash === '#products') + window.addEventListener('hashchange', handleHashChange) return () => { window.removeEventListener('hashchange', handleHashChange) } - }, []) + }, [setHasProductsInLocation]) useEffect(() => { if (hasProductsInLocation && courseProductsRef.current) {