Files
supabase/apps/docs/app/not-found.tsx
T
Charis 5d2bdc9efb refactor(docs): move last pages over to app router (#29293)
The end of the Great Migration is here!!!

Moves the last pages over, deleting pages like the FAQ that we don't use
and that contain duplicated information anyway.

Dev secret auth page URL had to change as App Router doesn't like the
leading underscores in the path.

Also fixes the not-found recommendations to use the proper Next.js
not-found page so it will return a 404 as it should. (I was under the
erroneous impression that I couldn't get the pathname in not-found.tsx,
that is not true, so this works better.)
2024-09-13 13:28:15 -04:00

51 lines
1.6 KiB
TypeScript

import { type Metadata } from 'next'
import Link from 'next/link'
import { Button } from 'ui'
import { Recommendations, SearchButton } from '~/features/recommendations/NotFound.client'
import { LayoutMainContent } from '~/layouts/DefaultLayout'
import { SidebarSkeleton } from '~/layouts/MainSkeleton'
export default function NotFound() {
return (
<SidebarSkeleton>
<LayoutMainContent>
<article className="prose max-w-[80ch]">
<h1>404: We couldn&apos;t find that page</h1>
<p>
Sorry, we couldn&apos;t find that page. It might be missing, or we had a temporary error
generating it.
</p>
<div className="flex flex-wrap gap-4 pt-4">
<SearchButton />
<Button type="default" size="small" className="p-4" asChild>
<Link href="/" className="no-underline">
Return to homepage
</Link>
</Button>
<Button type="text" size="small" asChild>
<Link
href="https://github.com/supabase/supabase/issues/new?assignees=&labels=documentation&projects=&template=2.Improve_docs.md"
target="_blank"
rel="noreferrer noopener"
className="no-underline"
>
Report missing page
</Link>
</Button>
</div>
<Recommendations />
</article>
</LayoutMainContent>
</SidebarSkeleton>
)
}
export const metadata: Metadata = {
title: 'Not found',
robots: {
index: false,
},
}