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:
1 parent
b5b4134b75
commit
75c79f76c8
30 files changed
+70
-209
No files matched your search
@@ -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);
|
||||
};
|
||||
Reference in new issue
Block a user