From 40b9e93a48507c219c91dfe1a76d4cda16b287fc Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Sun, 16 Jul 2023 23:35:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Fix=20ssr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/pre-commit | 1 + src/pages/chat/[id]/index.page.tsx | 2 +- src/pages/setting/index.page.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index cf0c46b936..8da041a224 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,5 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" +npm run type-check npx --no-install lint-staged diff --git a/src/pages/chat/[id]/index.page.tsx b/src/pages/chat/[id]/index.page.tsx index 090e3b990c..e2d00fb10c 100644 --- a/src/pages/chat/[id]/index.page.tsx +++ b/src/pages/chat/[id]/index.page.tsx @@ -38,6 +38,6 @@ const Chat = memo(() => { }); export default Chat; -export const getServerSideProps = async (context: any) => ({ +export const getStaticProps = async (context: any) => ({ props: await serverSideTranslations(context.locale), }); diff --git a/src/pages/setting/index.page.tsx b/src/pages/setting/index.page.tsx index cb6748c91d..bce29e7c74 100644 --- a/src/pages/setting/index.page.tsx +++ b/src/pages/setting/index.page.tsx @@ -31,7 +31,7 @@ const SettingLayout = memo(() => { ); }); -export const getServerSideProps = async (context: any) => ({ +export const getStaticProps = async (context: any) => ({ props: await serverSideTranslations(context.locale, ['common', 'setting']), });