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
@@ -17,7 +17,7 @@ import { Discord } from "@calcom/ui/components/icon/Discord";
import PageWrapper from "@components/PageWrapper";
import { ssgInit } from "@server/lib/ssg";
import { getTranslations } from "@server/lib/getTranslations";
enum pageType {
ORG = "org",
@@ -273,11 +273,11 @@ export default function Custom404() {
Custom404.PageWrapper = PageWrapper;
export const getStaticProps = async (context: GetStaticPropsContext) => {
const ssr = await ssgInit(context);
const i18n = await getTranslations(context);
return {
props: {
trpcState: ssr.dehydrate(),
i18n,
},
};
};
+3 -3
View File
@@ -10,7 +10,7 @@ import { X } from "@calcom/ui/components/icon";
import PageWrapper from "@components/PageWrapper";
import AuthContainer from "@components/ui/AuthContainer";
import { ssgInit } from "@server/lib/ssg";
import { getTranslations } from "@server/lib/getTranslations";
const querySchema = z.object({
error: z.string().optional(),
@@ -50,11 +50,11 @@ export default function Error() {
Error.PageWrapper = PageWrapper;
export const getStaticProps = async (context: GetStaticPropsContext) => {
const ssr = await ssgInit(context);
const i18n = await getTranslations(context);
return {
props: {
trpcState: ssr.dehydrate(),
i18n,
},
};
};