Open History to see the last commit
1import { useMatches } from "@tanstack/react-router";
2
3// useLocation switches as soon as a navigation starts, while <Outlet> keeps the old page until
4// the next route's lazy chunk loads. Chrome that frames the page must follow the committed match.
5export function useRenderedSettingsPathname(): string {
6 return useMatches({ select: (matches) => matches.at(-1)?.pathname ?? "" });
7}