Skip to content

Commit

Permalink
♻️ refactor: GetStaticPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
倏昱 committed Jul 17, 2023
1 parent c733936 commit 59dcbe9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/chat/[id]/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});
8 changes: 7 additions & 1 deletion src/pages/chat/index.page.tsx
Original file line number Diff line number Diff line change
@@ -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),
});
2 changes: 1 addition & 1 deletion src/pages/setting/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
});

Expand Down

0 comments on commit 59dcbe9

Please sign in to comment.