mirror of
https://github.com/supabase/supabase.git
synced 2026-05-10 02:39:56 -04:00
4a0bb36ca8
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { useParams } from 'common'
|
|
import { PropsWithChildren } from 'react'
|
|
|
|
import AuthLayout from './AuthLayout'
|
|
import { PageLayout } from '@/components/layouts/PageLayout/PageLayout'
|
|
import { UnknownInterface } from '@/components/ui/UnknownInterface'
|
|
import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled'
|
|
|
|
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 title="Email">
|
|
{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>
|
|
)
|
|
}
|