import { useOpenWebBrowser } from '@/libs/hooks'; import { useScrollRestoration } from '@/libs/hooks/useScrollRestoration'; import AppProvider from '@/libs/provider/AppProvider'; import createEmotionCache from '@/libs/utils/createEmotionCache'; import { CacheProvider, EmotionCache } from '@emotion/react'; import { HydrationBoundary, QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { SessionProvider } from 'next-auth/react'; import type { AppProps } from 'next/app'; import Head from 'next/head'; import { useState } from 'react'; import { RecoilRoot } from 'recoil'; import './globals.css'; // 클라이언트 사이드 캐시 생성 const clientSideEmotionCache = createEmotionCache(); interface MyAppProps extends AppProps { emotionCache?: EmotionCache; } export default function MyApp({ Component, pageProps, router, emotionCache = clientSideEmotionCache }: MyAppProps) { useScrollRestoration(router); useOpenWebBrowser(); const [client] = useState(() => new QueryClient()); return ( <> ); }