🐛 fix: Fix ssr

This commit is contained in:
canisminor1990
2023-07-16 23:35:33 +08:00
parent 4a1995f995
commit 40b9e93a48
3 changed files with 3 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run type-check
npx --no-install lint-staged

View File

@@ -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),
});

View File

@@ -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']),
});