import { siteConfig } from '@/lib/config' import { getGlobalData } from '@/lib/db/getSiteData' import { getLayoutByTheme } from '@/themes/theme' import { useRouter } from 'next/router' /** * 404 * @param {*} props * @returns */ const NoFound = props => { // 根据页面路径加载不同Layout文件 const Layout = getLayoutByTheme({ theme: siteConfig('THEME'), router: useRouter() }) return } export async function getStaticProps(req) { const { locale } = req const props = (await getGlobalData({ from: '404', locale })) || {} return { props } } export default NoFound