Files
supabase/apps/docs/app/dev-secret-auth/page.tsx
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

12 lines
268 B
TypeScript

import { notFound } from 'next/navigation'
import { DevSecretAuthForm } from './AuthForm.client'
export default async function DevOnlySecretAuth() {
if (process.env.NEXT_PUBLIC_DEV_AUTH_PAGE !== 'true') {
throw notFound()
}
return <DevSecretAuthForm />
}