-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path_app.tsx
42 lines (37 loc) · 1.32 KB
/
_app.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React from "react";
import { CssBaseline } from "@material-ui/core";
import { ThemeProvider } from "@material-ui/core/styles";
import { Provider } from "next-auth/client";
import App from "next/app";
import Head from "next/head";
import theme from "utils/theme";
export default class MyApp extends App {
componentDidMount(): void {
// Remove the server-side injected CSS.
const jssStyles = document.querySelector("#jss-server-side");
jssStyles?.parentElement?.removeChild(jssStyles);
}
render(): JSX.Element {
/* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment */
const { Component, pageProps } = this.props;
return (
<>
<Head>
<title>Bits of Good General Solution</title>
<meta
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width"
/>
</Head>
{/* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */}
<Provider session={pageProps.session}>
<ThemeProvider theme={theme}>
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
<CssBaseline />
<Component {...pageProps} />
</ThemeProvider>
</Provider>
</>
);
}
}