mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 05:09:12 +03:00
feat: add feature flag for auth overview
This commit is contained in:
1 parent
5ddcb568ac
commit
331f9e03f1
2 files changed
+10
-6
No files matched your search
@@ -8,11 +8,15 @@ import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
|
||||
import { withAuth } from 'hooks/misc/withAuth'
|
||||
import ProjectLayout from '../ProjectLayout/ProjectLayout'
|
||||
import { generateAuthMenu } from './AuthLayout.utils'
|
||||
import { useFlag } from 'common'
|
||||
|
||||
const AuthProductMenu = () => {
|
||||
const router = useRouter()
|
||||
const { ref: projectRef = 'default' } = useParams()
|
||||
|
||||
const isAuthOverviewPage = useFlag('authOverviewPage')
|
||||
console.log('isAuthOverviewPage', isAuthOverviewPage)
|
||||
|
||||
const {
|
||||
authenticationSignInProviders,
|
||||
authenticationRateLimits,
|
||||
@@ -42,6 +46,7 @@ const AuthProductMenu = () => {
|
||||
authenticationMultiFactor,
|
||||
authenticationAttackProtection,
|
||||
authenticationAdvanced,
|
||||
authenticationShowOverview: isAuthOverviewPage,
|
||||
})}
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -10,7 +10,7 @@ export const generateAuthMenu = (
|
||||
authenticationMultiFactor: boolean
|
||||
authenticationAttackProtection: boolean
|
||||
authenticationAdvanced: boolean
|
||||
// authenticationOverview: boolean
|
||||
authenticationShowOverview: boolean
|
||||
}
|
||||
): ProductMenuGroup[] => {
|
||||
const {
|
||||
@@ -20,17 +20,16 @@ export const generateAuthMenu = (
|
||||
authenticationMultiFactor,
|
||||
authenticationAttackProtection,
|
||||
authenticationAdvanced,
|
||||
// authenticationOverview,
|
||||
authenticationShowOverview,
|
||||
} = flags ?? {}
|
||||
|
||||
return [
|
||||
{
|
||||
title: 'Manage',
|
||||
items: [
|
||||
// ...(authenticationOverview
|
||||
// ? [{ name: 'Overview', key: 'overview', url: `/project/${ref}/auth/overview`, items: [] }]
|
||||
// : []),
|
||||
{ name: 'Overview', key: 'overview', url: `/project/${ref}/auth/overview`, items: [] },
|
||||
...(authenticationShowOverview
|
||||
? [{ name: 'Overview', key: 'overview', url: `/project/${ref}/auth/overview`, items: [] }]
|
||||
: []),
|
||||
{ name: 'Users', key: 'users', url: `/project/${ref}/auth/users`, items: [] },
|
||||
],
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user