♻️ refactor: GetStaticPaths

This commit is contained in:
倏昱
2023-07-17 10:30:41 +08:00
parent c733936a02
commit 59dcbe9c48
3 changed files with 9 additions and 3 deletions

View File

@@ -38,6 +38,6 @@ const Chat = memo(() => {
});
export default Chat;
export const getServerSideProps = async (context: any) => ({
export const getStaticPaths = async (context: any) => ({
props: await serverSideTranslations(context.locale),
});

View File

@@ -1 +1,7 @@
export { default, getServerSideProps } from './[id]/index.page';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
export { default } from './[id]/index.page';
export const getStaticPaths = 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']),
});