Restructure codebase to use src directory

This commit is contained in:
Aaron William Po
2023-04-11 23:32:06 -04:00
parent 90f2cc2c0c
commit 08422fe24e
141 changed files with 6 additions and 4 deletions

29
src/pages/_app.tsx Normal file
View File

@@ -0,0 +1,29 @@
import UserContext from '@/contexts/userContext';
import useUser from '@/hooks/useUser';
import '@/styles/globals.css';
import type { AppProps } from 'next/app';
import { Space_Grotesk } from 'next/font/google';
const spaceGrotesk = Space_Grotesk({
subsets: ['latin'],
});
export default function App({ Component, pageProps }: AppProps) {
const { user, isLoading, error, mutate } = useUser();
return (
<>
<style jsx global>
{`
html {
font-family: ${spaceGrotesk.style.fontFamily};
}
`}
</style>
<UserContext.Provider value={{ user, isLoading, error, mutate }}>
<Component {...pageProps} />
</UserContext.Provider>
</>
);
}