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 AuthProvidersLayout = ({ children }: PropsWithChildren<{}>) => { const { ref } = useParams() const { authenticationSignInProviders, authenticationThirdPartyAuth } = useIsFeatureEnabled([ 'authentication:sign_in_providers', 'authentication:third_party_auth', ]) const navItems = [ { label: 'Briven Auth', href: `/project/${ref}/auth/providers`, }, ...(authenticationThirdPartyAuth ? [ { label: 'Third-Party Auth', href: `/project/${ref}/auth/third-party`, }, ] : []), ] return ( {authenticationSignInProviders ? ( {children} ) : ( )} ) }