import { Button } from '@payloadcms/ui' import LinkImport from 'next/link.js' import React from 'react' const Link = (LinkImport.default || LinkImport) as unknown as typeof LinkImport.default import type { AdminViewServerProps } from 'payload' import { customParamViewPath, customParamViewPathBase, customParamViewTitle, } from '../../../shared.js' export function CustomViewWithParam({ initPageResult, params }: AdminViewServerProps) { const { req: { payload: { config: { routes: { admin: adminRoute }, }, }, }, } = initPageResult const paramValue = params?.segments?.[1] return (

{customParamViewTitle}

This custom view is using a dynamic URL parameter `ID: {paramValue || 'None'}`

This custom view is not `exact` true, so it matches on `{customParamViewPathBase}` we well as `{customParamViewPath}`

     
) }