mirror of
https://github.com/supabase/supabase.git
synced 2026-07-02 02:54:18 +08:00
* basic subpages * add template descriptions * keep tabbed navigation alive * revert active tab * use bespoke layout for each template * redirect non-feature preview users away * template page improvements * fix docs link * add TemplateEditor * fix errors * better error for missing routes * extract slugifyTitle function to ensure consistent slugs
41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
import { PropsWithChildren } from 'react'
|
|
|
|
import { useParams } from 'common'
|
|
import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
|
|
import { UnknownInterface } from 'components/ui/UnknownInterface'
|
|
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
|
|
import AuthLayout from './AuthLayout'
|
|
|
|
export const AuthEmailsLayout = ({ children }: PropsWithChildren<{}>) => {
|
|
const { ref } = useParams()
|
|
|
|
const showEmails = useIsFeatureEnabled('authentication:emails')
|
|
|
|
const navItems = [
|
|
{
|
|
label: 'Templates',
|
|
href: `/project/${ref}/auth/templates`,
|
|
},
|
|
{
|
|
label: 'SMTP Settings',
|
|
href: `/project/${ref}/auth/smtp`,
|
|
},
|
|
]
|
|
|
|
return (
|
|
<AuthLayout>
|
|
{showEmails ? (
|
|
<PageLayout
|
|
title="Emails"
|
|
subtitle="Configure what emails your users receive and how they are sent"
|
|
navigationItems={navItems}
|
|
>
|
|
{children}
|
|
</PageLayout>
|
|
) : (
|
|
<UnknownInterface urlBack={`/project/${ref}/auth/users`} />
|
|
)}
|
|
</AuthLayout>
|
|
)
|
|
}
|