mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Restructure codebase to use src directory
This commit is contained in:
29
src/pages/_app.tsx
Normal file
29
src/pages/_app.tsx
Normal 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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user