'use client'; import { useEffect } from 'react'; export const useScrollToSection = () => { useEffect(() => { const scrollToId = localStorage.getItem('scrollToId'); if (scrollToId) { localStorage.removeItem('scrollToId'); const el = document.getElementById(scrollToId); if (el) { setTimeout(() => { el.scrollIntoView({ behavior: 'smooth', block: 'start' }); }, 200); } } }, []); };