Add feature flag for team accounts in home-menu-navigation
In the home-menu-navigation.tsx file, a feature flag for displaying the Team Accounts section has been implemented leveraging the 'If' component and the flags from the feature-flags.config file. Now, the display of the HomeAccountSelector depends on the status of the 'enableTeamAccounts' flag.
This commit is contained in:
@@ -2,9 +2,11 @@ import {
|
|||||||
BorderedNavigationMenu,
|
BorderedNavigationMenu,
|
||||||
BorderedNavigationMenuItem,
|
BorderedNavigationMenuItem,
|
||||||
} from '@kit/ui/bordered-navigation-menu';
|
} from '@kit/ui/bordered-navigation-menu';
|
||||||
|
import { If } from '@kit/ui/if';
|
||||||
|
|
||||||
import { AppLogo } from '~/components/app-logo';
|
import { AppLogo } from '~/components/app-logo';
|
||||||
import { ProfileAccountDropdownContainer } from '~/components/personal-account-dropdown-container';
|
import { ProfileAccountDropdownContainer } from '~/components/personal-account-dropdown-container';
|
||||||
|
import featuresFlagConfig from '~/config/feature-flags.config';
|
||||||
import { personalAccountNavigationConfig } from '~/config/personal-account-navigation.config';
|
import { personalAccountNavigationConfig } from '~/config/personal-account-navigation.config';
|
||||||
|
|
||||||
// home imports
|
// home imports
|
||||||
@@ -47,7 +49,9 @@ export function HomeMenuNavigation(props: { workspace: UserWorkspace }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={'flex justify-end space-x-2.5'}>
|
<div className={'flex justify-end space-x-2.5'}>
|
||||||
<HomeAccountSelector accounts={accounts} collapsed={false} />
|
<If condition={featuresFlagConfig.enableTeamAccounts}>
|
||||||
|
<HomeAccountSelector accounts={accounts} collapsed={false} />
|
||||||
|
</If>
|
||||||
|
|
||||||
<UserNotifications userId={user.id} />
|
<UserNotifications userId={user.id} />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user