QDF6MHUAGHZQVIN7ZW6BBINHXMY4EB6DJY65JFLK4TMS4GBCWXCQC
const location = useLocation();
const ref = useRef<HTMLLegendElement>(null);
useEffect(() => {
if (ref.current && location.hash === `#${slug}`) {
setTimeout(() => {
ref.current!.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'nearest' });
}, 500);
}
}, [location.hash, slug]);