diff --git a/src/app/Providers.tsx b/src/app/Providers.tsx index dc46845..8fff1eb 100644 --- a/src/app/Providers.tsx +++ b/src/app/Providers.tsx @@ -4,13 +4,10 @@ import { CssBaseline, ThemeProvider } from '@mui/material'; import { createStore, Provider } from 'jotai'; import theme from '@/constants/theme'; -import useCurrentPath from '@/hooks/useCurrentPath'; const store = createStore(); const Providers = ({ children }: { children: React.ReactNode }) => { - useCurrentPath(); - return ( diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 0c2adf0..15a489a 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -7,6 +7,7 @@ import { Avatar, Box, Button, Link, Stack, Typography } from '@mui/material'; import { getUser } from '@/app/api/user'; import { mainCategory } from '@/constants/category'; import color from '@/constants/color'; +import useCurrentPath from '@/hooks/useCurrentPath'; import useGetUser from '@/hooks/useGetUser'; const Header = () => { @@ -45,6 +46,8 @@ const Header = () => { } }, [user]); + useCurrentPath(); + return ( <>