-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
4,219 additions
and
9,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,27 @@ | ||
import React from 'react'; | ||
import App from 'next/app'; | ||
import { AppProps } from 'next/app'; | ||
import Head from 'next/head'; | ||
import { ThemeProvider } from '@material-ui/core/styles'; | ||
import CssBaseline from '@material-ui/core/CssBaseline'; | ||
import { AppCacheProvider } from '@mui/material-nextjs/v14-pagesRouter'; | ||
import { ThemeProvider } from '@mui/material/styles'; | ||
import CssBaseline from '@mui/material/CssBaseline'; | ||
import theme from '../theme'; | ||
|
||
export default class MyApp extends App { | ||
componentDidMount() { | ||
const jssStyles = document.querySelector('#jss-server-side'); | ||
if (jssStyles) { | ||
jssStyles.parentElement?.removeChild(jssStyles); | ||
} | ||
} | ||
export default function MyApp(props: AppProps) { | ||
const { Component, pageProps } = props; | ||
|
||
render() { | ||
const { Component, pageProps } = this.props; | ||
|
||
return ( | ||
<React.Fragment> | ||
<Head> | ||
<title>GitLab Merger Bot</title> | ||
<meta | ||
name='viewport' | ||
content='minimum-scale=1, initial-scale=1, width=device-width' | ||
/> | ||
</Head> | ||
<ThemeProvider theme={theme}> | ||
<CssBaseline /> | ||
<Component {...pageProps} /> | ||
</ThemeProvider> | ||
</React.Fragment> | ||
); | ||
} | ||
return ( | ||
<AppCacheProvider {...props}> | ||
<Head> | ||
<title>GitLab Merger Bot</title> | ||
<meta | ||
name='viewport' | ||
content='minimum-scale=1, initial-scale=1, width=device-width' | ||
/> | ||
</Head> | ||
<ThemeProvider theme={theme}> | ||
<CssBaseline /> | ||
<Component {...pageProps} /> | ||
</ThemeProvider> | ||
</AppCacheProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,33 @@ | ||
import React from 'react'; | ||
import Document, { Head, Main, NextScript } from 'next/document'; | ||
import { ServerStyleSheets } from '@material-ui/core/styles'; | ||
import { Head, Main, Html, NextScript, DocumentProps, DocumentContext } from 'next/document'; | ||
import { | ||
DocumentHeadTags, | ||
DocumentHeadTagsProps, | ||
documentGetInitialProps, | ||
} from '@mui/material-nextjs/v14-pagesRouter'; | ||
import theme from '../theme'; | ||
|
||
export default class AppDocument extends Document { | ||
render() { | ||
return ( | ||
<html lang='en'> | ||
<Head> | ||
{/* PWA primary color */} | ||
<meta name='theme-color' content={theme.palette.primary.main} /> | ||
<link | ||
rel='stylesheet' | ||
href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap' | ||
/> | ||
</Head> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</html> | ||
); | ||
} | ||
export default function AppDocument(props: DocumentProps & DocumentHeadTagsProps) { | ||
return ( | ||
<Html lang='en'> | ||
<Head> | ||
{/* PWA primary color */} | ||
<meta name='theme-color' content={theme.palette.primary.main} /> | ||
<link | ||
rel='stylesheet' | ||
href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap' | ||
/> | ||
<DocumentHeadTags {...props} /> | ||
</Head> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
); | ||
} | ||
|
||
AppDocument.getInitialProps = async (ctx) => { | ||
const sheets = new ServerStyleSheets(); | ||
const originalRenderPage = ctx.renderPage; | ||
|
||
ctx.renderPage = () => | ||
originalRenderPage({ | ||
enhanceApp: (App) => (props) => sheets.collect(<App {...props} />), | ||
}); | ||
|
||
const initialProps = await Document.getInitialProps(ctx); | ||
|
||
return { | ||
...initialProps, | ||
styles: [...React.Children.toArray(initialProps.styles), sheets.getStyleElement()], | ||
}; | ||
AppDocument.getInitialProps = async (ctx: DocumentContext) => { | ||
const finalProps = await documentGetInitialProps(ctx); | ||
return finalProps; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.