perf: Remove ssrInit completely (#20439)

* remove ssrInit completely

* remove instances of dehydratedState

* fix

* refactor

* fix type checks

* fix linting

* Refactor

* Refactor

* remove log
This commit is contained in:
Benny Joo authored and GitHub committed 2025-04-01 19:14:46 -04:00
1 parent b5b4134b75
commit 75c79f76c8
30 files changed
+70 -209

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { cookies, headers } from "next/headers";
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
import { createContext } from "@calcom/trpc/server/createContext";
import { buildLegacyRequest } from "@lib/buildLegacyCtx";
export const getTRPCContext = async () => {
const legacyReq = buildLegacyRequest(await headers(), await cookies());
return await createContext({ req: legacyReq, res: {} as any }, getServerSession);
};