diff --git a/pages/[prefix]/index.js b/pages/[prefix]/index.js index dc480fcc..53b8776a 100644 --- a/pages/[prefix]/index.js +++ b/pages/[prefix]/index.js @@ -30,7 +30,7 @@ const Slug = props => { /** * 验证文章密码 - * @param {*} result + * @param {*} passInput */ const validPassword = passInput => { if (!post) { @@ -129,7 +129,7 @@ export async function getStaticProps({ params: { prefix }, locale }) { fullSlug += '.html' } } - + // 在列表内查找文章 props.post = props?.allPages?.find(p => { return ( diff --git a/pages/auth/result.js b/pages/auth/result.js index 95a40cbc..c4553153 100644 --- a/pages/auth/result.js +++ b/pages/auth/result.js @@ -5,11 +5,9 @@ import Slug from '../[prefix]' /** /** - * 服务端接收参数处理 - * @param {*} ctx * @returns */ -export const getServerSideProps = async ctx => { +export const getStaticProps = async () => { const from = `auth` const props = await getGlobalData({ from }) diff --git a/tsconfig.json b/tsconfig.json index 9d6cbf42..31e1df1f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,7 +21,7 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "preserve" + "jsx": "react-jsx" }, "include": [ "next-env.d.ts",