mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-07-17 09:47:23 +00:00
Move next js project to archive (#207)
This commit is contained in:
49
archive/next-js-web-app/src/pages/_app.tsx
Normal file
49
archive/next-js-web-app/src/pages/_app.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import { AuthProvider } from '@/contexts/UserContext';
|
||||
|
||||
import '@/styles/globals.css';
|
||||
import type { AppProps } from 'next/app';
|
||||
import { useEffect } from 'react';
|
||||
import { themeChange } from 'theme-change';
|
||||
import { Analytics } from '@vercel/analytics/react';
|
||||
|
||||
import { Nunito_Sans } from 'next/font/google';
|
||||
import Head from 'next/head';
|
||||
import Layout from '@/components/ui/Layout';
|
||||
import CustomToast from '@/components/ui/CustomToast';
|
||||
|
||||
const font = Nunito_Sans({ subsets: ['latin-ext'] });
|
||||
|
||||
const App = ({ Component, pageProps }: AppProps) => {
|
||||
useEffect(() => {
|
||||
themeChange(false);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<style jsx global>
|
||||
{`
|
||||
html {
|
||||
font-family: ${font.style.fontFamily};
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
<Head>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0"
|
||||
/>
|
||||
</Head>
|
||||
<AuthProvider>
|
||||
<Layout>
|
||||
<CustomToast>
|
||||
<Component {...pageProps} />
|
||||
</CustomToast>
|
||||
</Layout>
|
||||
</AuthProvider>
|
||||
|
||||
<Analytics />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
Reference in New Issue
Block a user