11import { getFeatureFlags } from '@/app/posthog' ;
2- import { auth } from '@/utils/auth' ;
32import { UserMenu } from '@/components/user-menu' ;
43import { getOrganizations } from '@/data/getOrganizations' ;
4+ import { auth } from '@/utils/auth' ;
55import { Skeleton } from '@comp/ui/skeleton' ;
66import { headers } from 'next/headers' ;
77import { Suspense } from 'react' ;
@@ -18,14 +18,17 @@ export async function Header({
1818} ) {
1919 const { organizations } = await getOrganizations ( ) ;
2020
21- // Check feature flag for questionnaire menu item
21+ // Check feature flags for menu items
2222 const session = await auth . api . getSession ( {
2323 headers : await headers ( ) ,
2424 } ) ;
2525 let isQuestionnaireEnabled = false ;
26+ let isTrustNdaEnabled = false ;
2627 if ( session ?. user ?. id ) {
2728 const flags = await getFeatureFlags ( session . user . id ) ;
2829 isQuestionnaireEnabled = flags [ 'ai-vendor-questionnaire' ] === true ;
30+ isTrustNdaEnabled =
31+ flags [ 'is-trust-nda-enabled' ] === true || flags [ 'is-trust-nda-enabled' ] === 'true' ;
2932 }
3033
3134 return (
@@ -34,6 +37,7 @@ export async function Header({
3437 organizations = { organizations }
3538 organizationId = { organizationId }
3639 isQuestionnaireEnabled = { isQuestionnaireEnabled }
40+ isTrustNdaEnabled = { isTrustNdaEnabled }
3741 />
3842
3943 { ! hideChat && < AssistantButton /> }
0 commit comments