// src/app/artefacts/[artefactId]/page.tsx
// imports
function Page({ routeParams }: InferPagePropsType<RouteType>) {
const [{ artefactId }, session] = use(Promise.all([routeParams, auth()]))
void trpc.artefacts.getById.prefetch({ artefactId })
return (
<MainContainer>
<ArtefactView artefactId={artefactId} />
</MainContainer>
)
}
export default withParamValidation(Page, Route)
// src/app/artefacts/[artefactId]/page.tsx
// imports
function Page({ routeParams }: InferPagePropsType<RouteType>) {
const [{ artefactId }, session] = use(Promise.all([routeParams, auth()]))
void trpc.artefacts.getById.prefetch({ artefactId })
return (
<MainContainer>
<ArtefactView artefactId={artefactId} />
</MainContainer>
)
}
export default withParamValidation(Page, Route)