Files
supabase/apps/docs/app/not-found.tsx
T
Gildas GarciaandIvan Vasilov 96d43099bb chore: refactor Button API so that it can be used a standard button (#46880)
## Problem

Our `<Button>` component breaks the default `button` contract by
redefining the `type` prop to set its variant (`primary`, `default`,
etc) instead of the button type (`submit`, `button`, etc).
This is confusing and forces to write more code when using it with
shadcn components that expect/inject the standard button props.

## Solution

- rename the `type` prop to `variant`
- rename the `htmlType` prop to `type`
- propagate the changes where necessary
- format code

## How to test

As this is just prop renaming, if it builds it's ok

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-06-16 23:59:58 +02:00

49 lines
1.6 KiB
TypeScript

import { Recommendations, SearchButton } from '~/features/recommendations/NotFound.client'
import { LayoutMainContent } from '~/layouts/DefaultLayout'
import { SidebarSkeleton } from '~/layouts/MainSkeleton'
import { type Metadata } from 'next'
import Link from 'next/link'
import { Button } from 'ui'
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 variant="default" size="small" className="p-4" asChild>
<Link href="/" className="no-underline">
Return to homepage
</Link>
</Button>
<Button variant="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,
},
}