diff --git a/bun.lockb b/bun.lockb index 08746b8..aa841f4 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index d42d8f0..e3a10be 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "next": "15.1.3", "react": "^19.0.0", "react-dom": "^19.0.0", - "react-hook-form": "^7.54.2" + "react-hook-form": "^7.54.2", + "zustand": "^5.0.2" }, "devDependencies": { "typescript": "^5", diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 57e4d4e..907d848 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -3,6 +3,8 @@ import type { AppProps } from 'next/app' import { Box, createTheme, CssBaseline, ThemeProvider } from '@mui/material' import { Roboto } from 'next/font/google' import { CapAppBar } from '@/components/CapAppBar' +import { useUserStore } from '@/services/user' +import { useEffect } from 'react' const fontRoboto = Roboto({ subsets: ['latin'], @@ -23,6 +25,12 @@ const siteTheme = createTheme({ }) export default function App({ Component, pageProps }: AppProps) { + const userStore = useUserStore() + + useEffect(() => { + userStore.fetchUser() + }, []) + return ( <>