diff --git a/packages/web/lib/networking/queries/useGetViewerQuery.tsx b/packages/web/lib/networking/queries/useGetViewerQuery.tsx index 60649a8d5..9fbb84906 100644 --- a/packages/web/lib/networking/queries/useGetViewerQuery.tsx +++ b/packages/web/lib/networking/queries/useGetViewerQuery.tsx @@ -22,7 +22,6 @@ export type UserBasicData = { email: string source: string intercomHash: string - features: string[] featureList: Feature[] } @@ -49,7 +48,6 @@ export function useGetViewerQuery(): ViewerQueryResponse { email source intercomHash - features featureList { ...FeatureFields } diff --git a/packages/web/pages/settings/account.tsx b/packages/web/pages/settings/account.tsx index ec494c918..9ea8b774d 100644 --- a/packages/web/pages/settings/account.tsx +++ b/packages/web/pages/settings/account.tsx @@ -6,9 +6,13 @@ import { SpanBox, VStack, } from '../../components/elements/LayoutPrimitives' +import { ProgressBar } from '../../components/elements/ProgressBar' import { StyledText } from '../../components/elements/StyledText' +import { ConfirmationModal } from '../../components/patterns/ConfirmationModal' import { SettingsLayout } from '../../components/templates/SettingsLayout' import { styled, theme } from '../../components/tokens/stitches.config' +import { userHasFeature } from '../../lib/featureFlag' +import { emptyTrashMutation } from '../../lib/networking/mutations/emptyTrashMutation' import { updateEmailMutation } from '../../lib/networking/mutations/updateEmailMutation' import { updateUserMutation } from '../../lib/networking/mutations/updateUserMutation' import { updateUserProfileMutation } from '../../lib/networking/mutations/updateUserProfileMutation' @@ -17,9 +21,6 @@ import { useGetViewerQuery } from '../../lib/networking/queries/useGetViewerQuer import { useValidateUsernameQuery } from '../../lib/networking/queries/useValidateUsernameQuery' import { applyStoredTheme } from '../../lib/themeUpdater' import { showErrorToast, showSuccessToast } from '../../lib/toastHelpers' -import { ConfirmationModal } from '../../components/patterns/ConfirmationModal' -import { ProgressBar } from '../../components/elements/ProgressBar' -import { emptyTrashMutation } from '../../lib/networking/mutations/emptyTrashMutation' const ACCOUNT_LIMIT = 50_000 @@ -441,19 +442,23 @@ export default function Account(): JSX.Element { Beta features {!isValidating && ( <> - {viewerData?.me?.features.map((feature) => { + {viewerData?.me?.featureList.map((feature) => { return ( - {feature} + {`${feature.name}${ + userHasFeature(viewerData?.me, feature.name) + ? '' + : ' - Requested' + }`} ) })}