diff --git a/src/app/AppState.ts b/src/app/AppState.ts index d4ed02a2..9e3b0305 100644 --- a/src/app/AppState.ts +++ b/src/app/AppState.ts @@ -18,7 +18,6 @@ import { SWRKey } from '@/swr'; export type AppStateContextType = { // CORE - previousPathname?: string hasLoaded?: boolean hasLoadedWithAnimations?: boolean invalidateSwr?: (key?: SWRKey, revalidate?: boolean) => void diff --git a/src/app/AppStateProvider.tsx b/src/app/AppStateProvider.tsx index 22456a5b..c7047eaf 100644 --- a/src/app/AppStateProvider.tsx +++ b/src/app/AppStateProvider.tsx @@ -9,7 +9,6 @@ import { } from 'react'; import { AppStateContext } from '../app/AppState'; import { AnimationConfig } from '@/components/AnimateItems'; -import usePathnames from '@/utility/usePathnames'; import { getAuthAction } from '@/auth/actions'; import useSWR, { useSWRConfig } from 'swr'; import { @@ -53,8 +52,6 @@ export default function AppStateProvider({ const pathname = usePathname(); - const { previousPathname } = usePathnames(); - // CORE const [hasLoaded, setHasLoaded] = useState(false); @@ -222,7 +219,6 @@ export default function AppStateProvider({ { - const pathname = usePathname(); - - const currentRef = useRef(''); - const previousRef = useRef(''); - - useEffect(() => { - previousRef.current = currentRef.current; - currentRef.current = pathname; - }, [pathname]); - - return { - currentPathname: currentRef.current, - previousPathname: previousRef.current, - }; -}; - -export default usePathnames; \ No newline at end of file