File tree Expand file tree Collapse file tree
packages/features/auth/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ export type PageProps = {
1313
1414export type LayoutProps = { params : Promise < Params > ; children : React . ReactElement } ;
1515
16- export { type ReadonlyHeaders } from "next/dist/server/web/spec-extension/adapters/ headers" ;
17- export { type ReadonlyRequestCookies } from "next/dist/server/web/spec-extension/adapters/request-cookies" ;
16+ export type ReadonlyHeaders = Awaited < ReturnType < typeof import ( "next/headers" ) . headers > > ;
17+ export type ReadonlyRequestCookies = Awaited < ReturnType < typeof import ( "next/headers" ) . cookies > > ;
Original file line number Diff line number Diff line change 11import type { SearchParams } from "app/_types" ;
22import { type Params } from "app/_types" ;
3+ import type { ReadonlyHeaders , ReadonlyRequestCookies } from "app/_types" ;
34import type { GetServerSidePropsContext , NextApiRequest } from "next" ;
4- import { type ReadonlyHeaders } from "next/dist/server/web/spec-extension/adapters/headers" ;
5- import { type ReadonlyRequestCookies } from "next/dist/server/web/spec-extension/adapters/request-cookies" ;
65
76const createProxifiedObject = ( object : Record < string , string > ) =>
87 new Proxy ( object , {
Original file line number Diff line number Diff line change 11import type { IncomingMessage } from "http" ;
2+ import type { NextPageContext } from "next" ;
23import { SessionProvider } from "next-auth/react" ;
3- import type { AppContextType } from "next/dist/shared/lib/utils" ;
44import React from "react" ;
55import CacheProvider from "react-inlinesvg/provider" ;
66
@@ -32,8 +32,8 @@ declare global {
3232 }
3333}
3434
35- MyApp . getInitialProps = async ( ctx : AppContextType ) => {
36- const { req } = ctx . ctx ;
35+ MyApp . getInitialProps = async ( { ctx } : { ctx : NextPageContext } ) => {
36+ const { req } = ctx ;
3737
3838 let newLocale = "en" ;
3939
Original file line number Diff line number Diff line change @@ -2,11 +2,12 @@ import { parse } from "accept-language-parser";
22import { lookup } from "bcp-47-match" ;
33import type { GetTokenParams } from "next-auth/jwt" ;
44import { getToken } from "next-auth/jwt" ;
5- import { type ReadonlyHeaders } from "next/dist/server/web/spec-extension/adapters/headers" ;
6- import { type ReadonlyRequestCookies } from "next/dist/server/web/spec-extension/adapters/request-cookies" ;
75
86import { i18n } from "@calcom/config/next-i18next.config" ;
97
8+ type ReadonlyHeaders = Awaited < ReturnType < typeof import ( "next/headers" ) . headers > > ;
9+ type ReadonlyRequestCookies = Awaited < ReturnType < typeof import ( "next/headers" ) . cookies > > ;
10+
1011/**
1112 * This is a slimmed down version of the `getServerSession` function from
1213 * `next-auth`.
You can’t perform that action at this time.
0 commit comments