import { useRouterState } from "@tanstack/react-router";

export function useOnSubpath(path: string) {
    const {location } = useRouterState();
    const onSubpath = location.pathname.startsWith(path);
    return onSubpath;
}