Add 404 and error boundary components wired into router
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useSuspenseQuery } from '@tanstack/react-query'
|
||||
import { createFileRoute, notFound } from '@tanstack/react-router'
|
||||
import { Helmet } from 'react-helmet-async'
|
||||
import { NotFound } from '~/components/not-found'
|
||||
import { PageView } from '~/components/page-view'
|
||||
import { pageBySlugQuery } from '~/lib/queries'
|
||||
|
||||
@@ -10,6 +11,7 @@ export const Route = createFileRoute('/$slug')({
|
||||
if (!page) throw notFound()
|
||||
},
|
||||
component: CmsPage,
|
||||
notFoundComponent: () => <NotFound />,
|
||||
})
|
||||
|
||||
function CmsPage() {
|
||||
|
||||
Reference in New Issue
Block a user