Added base path
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
import '../styles/globals.css'
|
||||
import type { AppProps } from 'next/app'
|
||||
import { FC } from 'react'
|
||||
import Head from 'next/head'
|
||||
import {useRouter} from 'next/router'
|
||||
|
||||
const MyApp: FC<AppProps> = ({ Component, pageProps }) => {
|
||||
return <Component {...pageProps} />
|
||||
const router = useRouter()
|
||||
return <>
|
||||
<Head>
|
||||
<link rel='icon' href={`${router.basePath}/favicon.ico`} />
|
||||
</Head>
|
||||
<Component {...pageProps} />
|
||||
</>
|
||||
}
|
||||
|
||||
export default MyApp
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import { Html, Main, NextScript, DocumentProps, Head } from 'next/document'
|
||||
import { FC } from 'react'
|
||||
import Dict = NodeJS.Dict
|
||||
|
||||
const MyDocument: FC<DocumentProps> = ({ __NEXT_DATA__ }) => {
|
||||
const pageProps: Dict<unknown> | undefined = __NEXT_DATA__?.props?.pageProps
|
||||
return (
|
||||
<Html>
|
||||
<Head />
|
||||
<body className={pageProps?.bodyClassName as string}>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
|
||||
export default MyDocument
|
||||
@@ -10,7 +10,6 @@ const Page: NextPage<PropsGroupProvider> = ({ id, ...initial }) => {
|
||||
<Head>
|
||||
<title>Factorio Microservices</title>
|
||||
<meta name='description' content='Create Factorio microservices' />
|
||||
<link rel='icon' href='/favicon.ico' />
|
||||
</Head>
|
||||
<Home />
|
||||
</GroupProvider>
|
||||
|
||||
Reference in New Issue
Block a user