chore: [app-router-migration 39] refactor ssr/ssg functions (#13336)

This commit is contained in:
DmytroHryshyn authored and GitHub committed 2024-01-19 15:58:37 -07:00
1 parent 5685d343b1
commit ff1aefe539
21 files changed
+168 -81

No files matched your search

+3 -3
View File
@@ -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,
};
};