mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-22 23:16:44 +00:00
fix: attempt to fix ssr issues
This commit is contained in:
@@ -22,13 +22,15 @@ export const Footer: React.FC<{
|
||||
<div className={styles.copyright}>Copyright 2021 Travis Fischer</div>
|
||||
|
||||
<div className={styles.settings}>
|
||||
<a
|
||||
className={styles.toggleDarkMode}
|
||||
onClick={toggleDarkMode}
|
||||
title='Tottle dark mode'
|
||||
>
|
||||
{isDarkMode ? <IoMoonSharp /> : <IoSunnyOutline />}
|
||||
</a>
|
||||
{!config.isServer && (
|
||||
<a
|
||||
className={styles.toggleDarkMode}
|
||||
onClick={toggleDarkMode}
|
||||
title='Tottle dark mode'
|
||||
>
|
||||
{isDarkMode ? <IoMoonSharp /> : <IoSunnyOutline />}
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className={styles.social}>
|
||||
|
||||
@@ -4,7 +4,6 @@ import Link from 'next/link'
|
||||
import cs from 'classnames'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useLocalStorage, useSearchParam } from 'react-use'
|
||||
import { IconContext } from 'react-icons'
|
||||
import BodyClassName from 'react-body-classname'
|
||||
|
||||
// core notion renderer
|
||||
@@ -122,7 +121,7 @@ export const NotionPage: React.FC<types.PageProps> = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<IconContext.Provider value={{ style: { verticalAlign: 'middle' } }}>
|
||||
<>
|
||||
<PageHead site={site} />
|
||||
|
||||
<Head>
|
||||
@@ -220,6 +219,6 @@ export const NotionPage: React.FC<types.PageProps> = ({
|
||||
/>
|
||||
|
||||
<CustomHtml site={site} />
|
||||
</IconContext.Provider>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user