mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
24 lines
581 B
JavaScript
24 lines
581 B
JavaScript
import BLOG from '@/blog.config'
|
|
import { siteConfig } from '@/lib/config'
|
|
import { getGlobalData } from '@/lib/db/getSiteData'
|
|
import { DynamicLayout } from '@/themes/theme'
|
|
|
|
/**
|
|
* 404
|
|
* @param {*} props
|
|
* @returns
|
|
*/
|
|
const NoFound = props => {
|
|
const theme = siteConfig('THEME', BLOG.THEME, props.NOTION_CONFIG)
|
|
return <DynamicLayout theme={theme} layoutName='Layout404' {...props} />
|
|
}
|
|
|
|
export async function getStaticProps(req) {
|
|
const { locale } = req
|
|
|
|
const props = (await getGlobalData({ from: '404', locale })) || {}
|
|
return { props }
|
|
}
|
|
|
|
export default NoFound
|