export type RenderContext = { pathname: string origin: string apiBaseURL?: string cookie?: string setCookies?: string[] csrf?: { token?: string; pending?: Promise } forwardedFor?: string status?: number } // The server build replaces this module with the AsyncLocalStorage implementation. export const currentRenderContext = (): RenderContext | undefined => { if (typeof window === 'undefined') return undefined return { pathname: window.location.pathname, origin: window.location.origin } }