Commit f8429c35 authored by Mark Kane's avatar Mark Kane
Browse files

Fix: useBasePath in Favicon (planning#428)

parent a900df9c
import useBasePath from '../shared/use-base-path'
export default () => {
const basePath = useBasePath()
return (
<link rel="shortcut icon" href={`${basePath}/favicon-32x32.png`} />
)
}
import Document, { Html, Head, Main, NextScript } from 'next/document'
import Favicon from '@/components/Favicon'
class CustomizedDocument extends Document {
static async getInitialProps(context) {
......@@ -10,7 +11,7 @@ class CustomizedDocument extends Document {
return (
<Html>
<Head>
<link rel="shortcut icon" href={`${process.env.NEXT_PUBLIC_BASE_PATH ? process.env.NEXT_PUBLIC_BASE_PATH : ''}/favicon-32x32.png`} />
<Favicon />
</Head>
<body>
<Main />
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment