mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
♻️ refactor: GetStaticPaths
This commit is contained in:
@@ -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),
|
||||
});
|
||||
|
||||
@@ -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),
|
||||
});
|
||||
|
||||
@@ -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']),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user