()
| 2 | import { ActiveRouteContext } from '../components/context/ActiveRouteContext/ActiveRouteContext'; |
| 3 | |
| 4 | export const useActiveRoute = () => { |
| 5 | const ctx = useContext(ActiveRouteContext); |
| 6 | if (!ctx) throw new Error('useActiveRoute must be used within an ActiveRouteProvider'); |
| 7 | return ctx; |
| 8 | }; |