chore: [app-router-migration 39] refactor ssr/ssg functions (#13336)
This commit is contained in:
1 parent
5685d343b1
commit
ff1aefe539
21 files changed
+168
-81
No files matched your search
@@ -2,13 +2,13 @@ import NotFoundPage from "@pages/404";
|
||||
import { WithLayout } from "app/layoutHOC";
|
||||
import type { GetStaticPropsContext } from "next";
|
||||
|
||||
import { ssgInit } from "@server/lib/ssg";
|
||||
import { getTranslations } from "@server/lib/getTranslations";
|
||||
|
||||
const getData = async (context: GetStaticPropsContext) => {
|
||||
const ssg = await ssgInit(context);
|
||||
const i18n = await getTranslations(context);
|
||||
|
||||
return {
|
||||
dehydratedState: ssg.dehydrate(),
|
||||
i18n,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user