Unverified Commit 607e383d authored by Josh Story's avatar Josh Story Committed by GitHub

relocate dynamic APIs (#70300)

These files are about to change. This commit just moves them to make
diff and history tracking easier to follow
parent 9c9f4264
export * from './dist/client/components/headers' export * from './dist/server/request/headers'
module.exports = require('./dist/client/components/headers') module.exports = require('./dist/server/request/headers')
export * from '../client/components/headers' export * from '../server/request/headers'
...@@ -89,13 +89,13 @@ import type { PageExtensions } from './page-extensions-type' ...@@ -89,13 +89,13 @@ import type { PageExtensions } from './page-extensions-type'
import { formatDynamicImportPath } from '../lib/format-dynamic-import-path' import { formatDynamicImportPath } from '../lib/format-dynamic-import-path'
import { isInterceptionRouteAppPath } from '../server/lib/interception-routes' import { isInterceptionRouteAppPath } from '../server/lib/interception-routes'
import { checkIsRoutePPREnabled } from '../server/lib/experimental/ppr' import { checkIsRoutePPREnabled } from '../server/lib/experimental/ppr'
import type { Params } from '../client/components/params' import type { Params } from '../server/request/params'
import { FallbackMode } from '../lib/fallback' import { FallbackMode } from '../lib/fallback'
import { import {
fallbackModeToStaticPathsResult, fallbackModeToStaticPathsResult,
parseStaticPathsResult, parseStaticPathsResult,
} from '../lib/fallback' } from '../lib/fallback'
import { getParamKeys } from '../client/components/fallback-params' import { getParamKeys } from '../server/request/fallback-params'
import type { OutgoingHttpHeaders } from 'http' import type { OutgoingHttpHeaders } from 'http'
export type ROUTER_TYPE = 'pages' | 'app' export type ROUTER_TYPE = 'pages' | 'app'
......
...@@ -9,9 +9,9 @@ export function ClientPageRoot({ ...@@ -9,9 +9,9 @@ export function ClientPageRoot({
}) { }) {
if (typeof window === 'undefined') { if (typeof window === 'undefined') {
const { createDynamicallyTrackedParams } = const { createDynamicallyTrackedParams } =
require('./fallback-params') as typeof import('./fallback-params') require('../../server/request/fallback-params') as typeof import('../../server/request/fallback-params')
const { createDynamicallyTrackedSearchParams } = const { createDynamicallyTrackedSearchParams } =
require('./search-params') as typeof import('./search-params') require('../../server/request/search-params') as typeof import('../../server/request/search-params')
// We expect to be passed searchParams but even if we aren't we can construct one from // We expect to be passed searchParams but even if we aren't we can construct one from
// an empty object. We only do this if we are in a static generation as a performance // an empty object. We only do this if we are in a static generation as a performance
......
import type { FlightRouterState } from '../../server/app-render/types' import type { FlightRouterState } from '../../server/app-render/types'
import type { Params } from './params' import type { Params } from '../../server/request/params'
import { useContext, useMemo } from 'react' import { useContext, useMemo } from 'react'
import { import {
......
...@@ -3,7 +3,7 @@ import type { ...@@ -3,7 +3,7 @@ import type {
Segment, Segment,
} from '../../../server/app-render/types' } from '../../../server/app-render/types'
import { INTERCEPTION_ROUTE_MARKERS } from '../../../server/lib/interception-routes' import { INTERCEPTION_ROUTE_MARKERS } from '../../../server/lib/interception-routes'
import type { Params } from '../params' import type { Params } from '../../../server/request/params'
import { import {
isGroupSegment, isGroupSegment,
DEFAULT_SEGMENT_KEY, DEFAULT_SEGMENT_KEY,
......
...@@ -3,7 +3,7 @@ import type { IncrementalCache } from '../../server/lib/incremental-cache' ...@@ -3,7 +3,7 @@ import type { IncrementalCache } from '../../server/lib/incremental-cache'
import type { DynamicServerError } from './hooks-server-context' import type { DynamicServerError } from './hooks-server-context'
import type { FetchMetrics } from '../../server/base-http' import type { FetchMetrics } from '../../server/base-http'
import type { Revalidate } from '../../server/lib/revalidate' import type { Revalidate } from '../../server/lib/revalidate'
import type { FallbackRouteParams } from './fallback-params' import type { FallbackRouteParams } from '../../server/request/fallback-params'
// Share the instance module in the next-shared layer // Share the instance module in the next-shared layer
import { staticGenerationAsyncStorage } from './static-generation-async-storage-instance' with { 'turbopack-transition': 'next-shared' } import { staticGenerationAsyncStorage } from './static-generation-async-storage-instance' with { 'turbopack-transition': 'next-shared' }
......
...@@ -22,7 +22,7 @@ import { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node' ...@@ -22,7 +22,7 @@ import { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'
import { NEXT_IS_PRERENDER_HEADER } from '../../client/components/app-router-headers' import { NEXT_IS_PRERENDER_HEADER } from '../../client/components/app-router-headers'
import type { FetchMetrics } from '../../server/base-http' import type { FetchMetrics } from '../../server/base-http'
import type { StaticGenerationStore } from '../../client/components/static-generation-async-storage.external' import type { StaticGenerationStore } from '../../client/components/static-generation-async-storage.external'
import type { FallbackRouteParams } from '../../client/components/fallback-params' import type { FallbackRouteParams } from '../../server/request/fallback-params'
export const enum ExportedAppPageFiles { export const enum ExportedAppPageFiles {
HTML = 'HTML', HTML = 'HTML',
......
...@@ -27,7 +27,7 @@ import { isStaticGenEnabled } from '../../server/route-modules/app-route/helpers ...@@ -27,7 +27,7 @@ import { isStaticGenEnabled } from '../../server/route-modules/app-route/helpers
import type { ExperimentalConfig } from '../../server/config-shared' import type { ExperimentalConfig } from '../../server/config-shared'
import { isMetadataRouteFile } from '../../lib/metadata/is-metadata-route' import { isMetadataRouteFile } from '../../lib/metadata/is-metadata-route'
import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths' import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'
import type { Params } from '../../client/components/params' import type { Params } from '../../server/request/params'
export const enum ExportedAppRouteFiles { export const enum ExportedAppRouteFiles {
BODY = 'BODY', BODY = 'BODY',
......
...@@ -40,11 +40,11 @@ import { ...@@ -40,11 +40,11 @@ import {
turborepoTraceAccess, turborepoTraceAccess,
TurborepoAccessTraceResult, TurborepoAccessTraceResult,
} from '../build/turborepo-access-trace' } from '../build/turborepo-access-trace'
import type { Params } from '../client/components/params' import type { Params } from '../server/request/params'
import { import {
getFallbackRouteParams, getFallbackRouteParams,
type FallbackRouteParams, type FallbackRouteParams,
} from '../client/components/fallback-params' } from '../server/request/fallback-params'
import { needsExperimentalReact } from '../lib/needs-experimental-react' import { needsExperimentalReact } from '../lib/needs-experimental-react'
const envConfig = require('../shared/lib/runtime-config.external') const envConfig = require('../shared/lib/runtime-config.external')
......
...@@ -30,7 +30,7 @@ import type { ...@@ -30,7 +30,7 @@ import type {
} from './types/metadata-interface' } from './types/metadata-interface'
import { isNotFoundError } from '../../client/components/not-found' import { isNotFoundError } from '../../client/components/not-found'
import type { MetadataContext } from './types/resolvers' import type { MetadataContext } from './types/resolvers'
import type { CreateDynamicallyTrackedParams } from '../../client/components/fallback-params' import type { CreateDynamicallyTrackedParams } from '../../server/request/fallback-params'
import type { StaticGenerationStore } from '../../client/components/static-generation-async-storage.external' import type { StaticGenerationStore } from '../../client/components/static-generation-async-storage.external'
import { trackFallbackParamAccessed } from '../../server/app-render/dynamic-rendering' import { trackFallbackParamAccessed } from '../../server/app-render/dynamic-rendering'
......
...@@ -49,7 +49,7 @@ import { getTracer } from '../../server/lib/trace/tracer' ...@@ -49,7 +49,7 @@ import { getTracer } from '../../server/lib/trace/tracer'
import { ResolveMetadataSpan } from '../../server/lib/trace/constants' import { ResolveMetadataSpan } from '../../server/lib/trace/constants'
import { PAGE_SEGMENT_KEY } from '../../shared/lib/segment' import { PAGE_SEGMENT_KEY } from '../../shared/lib/segment'
import * as Log from '../../build/output/log' import * as Log from '../../build/output/log'
import type { CreateDynamicallyTrackedParams } from '../../client/components/fallback-params' import type { CreateDynamicallyTrackedParams } from '../../server/request/fallback-params'
type StaticIcons = Pick<ResolvedIcons, 'icon' | 'apple'> type StaticIcons = Pick<ResolvedIcons, 'icon' | 'apple'>
......
...@@ -137,7 +137,7 @@ import { createInitialRouterState } from '../../client/components/router-reducer ...@@ -137,7 +137,7 @@ import { createInitialRouterState } from '../../client/components/router-reducer
import { createMutableActionQueue } from '../../shared/lib/router/action-queue' import { createMutableActionQueue } from '../../shared/lib/router/action-queue'
import { getRevalidateReason } from '../instrumentation/utils' import { getRevalidateReason } from '../instrumentation/utils'
import { PAGE_SEGMENT_KEY } from '../../shared/lib/segment' import { PAGE_SEGMENT_KEY } from '../../shared/lib/segment'
import type { FallbackRouteParams } from '../../client/components/fallback-params' import type { FallbackRouteParams } from '../request/fallback-params'
import { DynamicServerError } from '../../client/components/hooks-server-context' import { DynamicServerError } from '../../client/components/hooks-server-context'
import { import {
type ReactServerPrerenderResolveToType, type ReactServerPrerenderResolveToType,
......
...@@ -19,7 +19,7 @@ import { getTracer } from '../lib/trace/tracer' ...@@ -19,7 +19,7 @@ import { getTracer } from '../lib/trace/tracer'
import { NextNodeServerSpan } from '../lib/trace/constants' import { NextNodeServerSpan } from '../lib/trace/constants'
import { StaticGenBailoutError } from '../../client/components/static-generation-bailout' import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'
import type { LoadingModuleData } from '../../shared/lib/app-router-context.shared-runtime' import type { LoadingModuleData } from '../../shared/lib/app-router-context.shared-runtime'
import type { Params } from '../../client/components/params' import type { Params } from '../request/params'
/** /**
* Use the provided loader tree to create the React Component tree. * Use the provided loader tree to create the React Component tree.
......
...@@ -19,21 +19,17 @@ import { ClientPageRoot } from '../../client/components/client-page' ...@@ -19,21 +19,17 @@ import { ClientPageRoot } from '../../client/components/client-page'
import { import {
createUntrackedSearchParams, createUntrackedSearchParams,
createDynamicallyTrackedSearchParams, createDynamicallyTrackedSearchParams,
} from '../../client/components/search-params' } from '../request/search-params'
import { createDynamicallyTrackedParams } from '../../client/components/fallback-params' import { createDynamicallyTrackedParams } from '../request/fallback-params'
import * as serverHooks from '../../client/components/hooks-server-context' import * as serverHooks from '../../client/components/hooks-server-context'
import { NotFoundBoundary } from '../../client/components/not-found-boundary' import { NotFoundBoundary } from '../../client/components/not-found-boundary'
import { patchFetch as _patchFetch } from '../lib/patch-fetch' import { patchFetch as _patchFetch } from '../lib/patch-fetch'
// not being used but needs to be included in the client manifest for /_not-found // not being used but needs to be included in the client manifest for /_not-found
import '../../client/components/error-boundary' import '../../client/components/error-boundary'
import { import { preloadStyle, preloadFont, preconnect } from './rsc/preloads'
preloadStyle, import { Postpone } from './rsc/postpone'
preloadFont, import { taintObjectReference } from './rsc/taint'
preconnect,
} from '../../server/app-render/rsc/preloads'
import { Postpone } from '../../server/app-render/rsc/postpone'
import { taintObjectReference } from '../../server/app-render/rsc/taint'
// patchFetch makes use of APIs such as `React.unstable_postpone` which are only available // patchFetch makes use of APIs such as `React.unstable_postpone` which are only available
// in the experimental channel of React, so export it from here so that it comes from the bundled runtime // in the experimental channel of React, so export it from here so that it comes from the bundled runtime
......
import type { FallbackRouteParams } from '../../client/components/fallback-params' import type { FallbackRouteParams } from '../../server/request/fallback-params'
import type { Params } from '../../client/components/params' import type { Params } from '../request/params'
export enum DynamicState { export enum DynamicState {
/** /**
......
...@@ -5,7 +5,7 @@ import type { IncrementalCache } from '../lib/incremental-cache' ...@@ -5,7 +5,7 @@ import type { IncrementalCache } from '../lib/incremental-cache'
import type { RenderOptsPartial } from '../app-render/types' import type { RenderOptsPartial } from '../app-render/types'
import type { FetchMetric } from '../base-http' import type { FetchMetric } from '../base-http'
import type { RequestLifecycleOpts } from '../base-server' import type { RequestLifecycleOpts } from '../base-server'
import type { FallbackRouteParams } from '../../client/components/fallback-params' import type { FallbackRouteParams } from '../../server/request/fallback-params'
import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths' import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'
......
import type { __ApiPreviewProps } from './api-utils' import type { __ApiPreviewProps } from './api-utils'
import type { LoadComponentsReturnType } from './load-components' import type { LoadComponentsReturnType } from './load-components'
import type { MiddlewareRouteMatch } from '../shared/lib/router/utils/middleware-route-matcher' import type { MiddlewareRouteMatch } from '../shared/lib/router/utils/middleware-route-matcher'
import type { Params } from '../client/components/params' import type { Params } from '../server/request/params'
import { import {
type FallbackRouteParams, type FallbackRouteParams,
getFallbackRouteParams, getFallbackRouteParams,
} from '../client/components/fallback-params' } from './request/fallback-params'
import type { NextConfig, NextConfigComplete } from './config-shared' import type { NextConfig, NextConfigComplete } from './config-shared'
import type { import type {
NextParsedUrlQuery, NextParsedUrlQuery,
......
import type { FindComponentsResult, NodeRequestHandler } from '../next-server' import type { FindComponentsResult, NodeRequestHandler } from '../next-server'
import type { LoadComponentsReturnType } from '../load-components' import type { LoadComponentsReturnType } from '../load-components'
import type { Options as ServerOptions } from '../next-server' import type { Options as ServerOptions } from '../next-server'
import type { Params } from '../../client/components/params' import type { Params } from '../request/params'
import type { ParsedUrl } from '../../shared/lib/router/utils/parse-url' import type { ParsedUrl } from '../../shared/lib/router/utils/parse-url'
import type { ParsedUrlQuery } from 'querystring' import type { ParsedUrlQuery } from 'querystring'
import type { UrlWithParsedQuery } from 'url' import type { UrlWithParsedQuery } from 'url'
......
...@@ -14,7 +14,7 @@ import type { FetchEventResult } from './web/types' ...@@ -14,7 +14,7 @@ import type { FetchEventResult } from './web/types'
import type { PrerenderManifest } from '../build' import type { PrerenderManifest } from '../build'
import type { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin' import type { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin'
import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from './request-meta' import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from './request-meta'
import type { Params } from '../client/components/params' import type { Params } from './request/params'
import type { MiddlewareRouteMatch } from '../shared/lib/router/utils/middleware-route-matcher' import type { MiddlewareRouteMatch } from '../shared/lib/router/utils/middleware-route-matcher'
import type { RouteMatch } from './route-matches/route-match' import type { RouteMatch } from './route-matches/route-match'
import type { IncomingMessage, ServerResponse } from 'http' import type { IncomingMessage, ServerResponse } from 'http'
......
import type { DraftModeProvider } from '../../server/async-storage/draft-mode-provider' import type { DraftModeProvider } from '../async-storage/draft-mode-provider'
import { staticGenerationAsyncStorage } from './static-generation-async-storage.external' import { staticGenerationAsyncStorage } from '../../client/components/static-generation-async-storage.external'
import { trackDynamicDataAccessed } from '../../server/app-render/dynamic-rendering' import { trackDynamicDataAccessed } from '../app-render/dynamic-rendering'
export class DraftMode { export class DraftMode {
/** /**
......
import { trackFallbackParamAccessed } from '../../server/app-render/dynamic-rendering' import { trackFallbackParamAccessed } from '../app-render/dynamic-rendering'
import { ReflectAdapter } from '../../server/web/spec-extension/adapters/reflect' import { ReflectAdapter } from '../web/spec-extension/adapters/reflect'
import { getRouteMatcher } from '../../shared/lib/router/utils/route-matcher' import { getRouteMatcher } from '../../shared/lib/router/utils/route-matcher'
import { getRouteRegex } from '../../shared/lib/router/utils/route-regex' import { getRouteRegex } from '../../shared/lib/router/utils/route-regex'
import type { Params } from './params' import type { Params } from './params'
import { staticGenerationAsyncStorage } from './static-generation-async-storage.external' import { staticGenerationAsyncStorage } from '../../client/components/static-generation-async-storage.external'
export type FallbackRouteParams = ReadonlyMap<string, string> export type FallbackRouteParams = ReadonlyMap<string, string>
......
import { import {
type ReadonlyRequestCookies, type ReadonlyRequestCookies,
RequestCookiesAdapter, RequestCookiesAdapter,
} from '../../server/web/spec-extension/adapters/request-cookies' } from '../web/spec-extension/adapters/request-cookies'
import { HeadersAdapter } from '../../server/web/spec-extension/adapters/headers' import { HeadersAdapter } from '../web/spec-extension/adapters/headers'
import { RequestCookies } from '../../server/web/spec-extension/cookies' import { RequestCookies } from '../web/spec-extension/cookies'
import { actionAsyncStorage } from './action-async-storage.external' import { actionAsyncStorage } from '../../client/components/action-async-storage.external'
import { DraftMode } from './draft-mode' import { DraftMode } from './draft-mode'
import { trackDynamicDataAccessed } from '../../server/app-render/dynamic-rendering' import { trackDynamicDataAccessed } from '../app-render/dynamic-rendering'
import { staticGenerationAsyncStorage } from './static-generation-async-storage.external' import { staticGenerationAsyncStorage } from '../../client/components/static-generation-async-storage.external'
import { getExpectedRequestStore } from './request-async-storage.external' import { getExpectedRequestStore } from '../../client/components/request-async-storage.external'
/** /**
* This function allows you to read the HTTP incoming request headers in * This function allows you to read the HTTP incoming request headers in
......
import type { ParsedUrlQuery } from 'querystring' import type { ParsedUrlQuery } from 'querystring'
import { staticGenerationAsyncStorage } from './static-generation-async-storage.external' import { staticGenerationAsyncStorage } from '../../client/components/static-generation-async-storage.external'
import { trackDynamicDataAccessed } from '../../server/app-render/dynamic-rendering' import { trackDynamicDataAccessed } from '../app-render/dynamic-rendering'
import { ReflectAdapter } from '../../server/web/spec-extension/adapters/reflect' import { ReflectAdapter } from '../web/spec-extension/adapters/reflect'
/** /**
* Takes a ParsedUrlQuery object and either returns it unmodified or returns an empty object * Takes a ParsedUrlQuery object and either returns it unmodified or returns an empty object
......
import type { RouteMatch } from '../route-matches/route-match' import type { RouteMatch } from '../route-matches/route-match'
import type { RouteDefinition } from '../route-definitions/route-definition' import type { RouteDefinition } from '../route-definitions/route-definition'
import type { Params } from '../../client/components/params' import type { Params } from '../request/params'
import { isDynamicRoute } from '../../shared/lib/router/utils' import { isDynamicRoute } from '../../shared/lib/router/utils'
import { import {
......
import type { Params } from '../../client/components/params' import type { Params } from '../request/params'
import type { RouteDefinition } from '../route-definitions/route-definition' import type { RouteDefinition } from '../route-definitions/route-definition'
/** /**
......
...@@ -13,7 +13,7 @@ import { ...@@ -13,7 +13,7 @@ import {
import * as vendoredContexts from './vendored/contexts/entrypoints' import * as vendoredContexts from './vendored/contexts/entrypoints'
import type { BaseNextRequest, BaseNextResponse } from '../../base-http' import type { BaseNextRequest, BaseNextResponse } from '../../base-http'
import type { ServerComponentsHmrCache } from '../../response-cache' import type { ServerComponentsHmrCache } from '../../response-cache'
import type { FallbackRouteParams } from '../../../client/components/fallback-params' import type { FallbackRouteParams } from '../../request/fallback-params'
let vendoredReactRSC let vendoredReactRSC
let vendoredReactSSR let vendoredReactSSR
......
import type { WebNextRequest, WebNextResponse } from './base-http/web' import type { WebNextRequest, WebNextResponse } from './base-http/web'
import type RenderResult from './render-result' import type RenderResult from './render-result'
import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from './request-meta' import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from './request-meta'
import type { Params } from '../client/components/params' import type { Params } from './request/params'
import type { LoadComponentsReturnType } from './load-components' import type { LoadComponentsReturnType } from './load-components'
import type { import type {
LoadedRenderOpts, LoadedRenderOpts,
......
'use client' 'use client'
import { createContext } from 'react' import { createContext } from 'react'
import type { Params } from '../../client/components/params' import type { Params } from '../../server/request/params'
export const SearchParamsContext = createContext<URLSearchParams | null>(null) export const SearchParamsContext = createContext<URLSearchParams | null>(null)
export const PathnameContext = createContext<string | null>(null) export const PathnameContext = createContext<string | null>(null)
......
import type { AppRouterInstance } from '../app-router-context.shared-runtime' import type { AppRouterInstance } from '../app-router-context.shared-runtime'
import type { Params } from '../../../client/components/params' import type { Params } from '../../../server/request/params'
import type { NextRouter } from './router' import type { NextRouter } from './router'
import React, { useMemo, useRef } from 'react' import React, { useMemo, useRef } from 'react'
......
...@@ -43,7 +43,7 @@ import { isBot } from './utils/is-bot' ...@@ -43,7 +43,7 @@ import { isBot } from './utils/is-bot'
import { omit } from './utils/omit' import { omit } from './utils/omit'
import { interpolateAs } from './utils/interpolate-as' import { interpolateAs } from './utils/interpolate-as'
import { handleSmoothScroll } from './utils/handle-smooth-scroll' import { handleSmoothScroll } from './utils/handle-smooth-scroll'
import type { Params } from '../../../client/components/params' import type { Params } from '../../../server/request/params'
declare global { declare global {
interface Window { interface Window {
......
import type { BaseNextRequest } from '../../../../server/base-http' import type { BaseNextRequest } from '../../../../server/base-http'
import type { MiddlewareMatcher } from '../../../../build/analysis/get-page-static-info' import type { MiddlewareMatcher } from '../../../../build/analysis/get-page-static-info'
import type { Params } from '../../../../client/components/params' import type { Params } from '../../../../server/request/params'
import { matchHas } from './prepare-destination' import { matchHas } from './prepare-destination'
export interface MiddlewareRouteMatch { export interface MiddlewareRouteMatch {
......
...@@ -13,7 +13,7 @@ import { ...@@ -13,7 +13,7 @@ import {
} from '../../../../server/lib/interception-routes' } from '../../../../server/lib/interception-routes'
import { NEXT_RSC_UNION_QUERY } from '../../../../client/components/app-router-headers' import { NEXT_RSC_UNION_QUERY } from '../../../../client/components/app-router-headers'
import { getCookieParser } from '../../../../server/api-utils/get-cookie-parser' import { getCookieParser } from '../../../../server/api-utils/get-cookie-parser'
import type { Params } from '../../../../client/components/params' import type { Params } from '../../../../server/request/params'
/** /**
* Ensure only a-zA-Z are used for param names for proper interpolating * Ensure only a-zA-Z are used for param names for proper interpolating
......
import type { RouteRegex } from './route-regex' import type { RouteRegex } from './route-regex'
import { DecodeError } from '../../utils' import { DecodeError } from '../../utils'
import type { Params } from '../../../../client/components/params' import type { Params } from '../../../../server/request/params'
export interface RouteMatchFn { export interface RouteMatchFn {
(pathname: string | null | undefined): false | Params (pathname: string | null | undefined): false | Params
......
import { cookies } from 'next/dist/client/components/headers' import { cookies } from 'next/dist/server/request/headers'
export default function Page() { export default function Page() {
const redirectCookie = cookies().get('redirect') const redirectCookie = cookies().get('redirect')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment