diff --git a/components/dashboard/src/contexts/FeatureFlagContext.tsx b/components/dashboard/src/contexts/FeatureFlagContext.tsx index 6da43d4e4c..cc449e2799 100644 --- a/components/dashboard/src/contexts/FeatureFlagContext.tsx +++ b/components/dashboard/src/contexts/FeatureFlagContext.tsx @@ -20,7 +20,6 @@ type FeatureFlagsType = { const defaultFeatureFlags = { startWithOptions: false, - showUsageView: false, showUseLastSuccessfulPrebuild: false, usePublicApiWorkspacesService: false, enablePersonalAccessTokens: false, @@ -40,7 +39,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => { const { project } = useContext(ProjectContext); const currentOrg = useCurrentOrg(); const [startWithOptions, setStartWithOptions] = useState(false); - const [showUsageView, setShowUsageView] = useState(false); const [showUseLastSuccessfulPrebuild, setShowUseLastSuccessfulPrebuild] = useState(false); const [enablePersonalAccessTokens, setPersonalAccessTokensEnabled] = useState(false); const [usePublicApiWorkspacesService, setUsePublicApiWorkspacesService] = useState(false); @@ -55,7 +53,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => { (async () => { const featureFlags: FeatureFlagConfig = { start_with_options: { defaultValue: false, setter: setStartWithOptions }, - usage_view: { defaultValue: false, setter: setShowUsageView }, showUseLastSuccessfulPrebuild: { defaultValue: false, setter: setShowUseLastSuccessfulPrebuild }, personalAccessTokensEnabled: { defaultValue: false, setter: setPersonalAccessTokensEnabled }, publicApiExperimentalWorkspaceService: { @@ -107,7 +104,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => { const flags = useMemo(() => { return { startWithOptions, - showUsageView, showUseLastSuccessfulPrebuild, enablePersonalAccessTokens, usePublicApiWorkspacesService, @@ -123,7 +119,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => { newSignupFlow, oidcServiceEnabled, orgGitAuthProviders, - showUsageView, showUseLastSuccessfulPrebuild, startWithOptions, usePublicApiWorkspacesService, diff --git a/components/dashboard/src/menu/OrganizationSelector.tsx b/components/dashboard/src/menu/OrganizationSelector.tsx index 943327ec9e..d81e8e4904 100644 --- a/components/dashboard/src/menu/OrganizationSelector.tsx +++ b/components/dashboard/src/menu/OrganizationSelector.tsx @@ -10,7 +10,6 @@ import { OrgIcon, OrgIconProps } from "../components/org-icon/OrgIcon"; import { useCurrentUser } from "../user-context"; import { BillingMode } from "@gitpod/gitpod-protocol/lib/billing-mode"; import { useUserBillingMode } from "../data/billing-mode/user-billing-mode-query"; -import { useFeatureFlags } from "../contexts/FeatureFlagContext"; import { useCurrentOrg, useOrganizations } from "../data/organizations/orgs-query"; import { useOrgBillingMode } from "../data/billing-mode/org-billing-mode-query"; import { useLocation } from "react-router"; @@ -23,7 +22,6 @@ export default function OrganizationSelector(p: OrganizationSelectorProps) { const currentOrg = useCurrentOrg(); const { data: userBillingMode } = useUserBillingMode(); const { data: orgBillingMode } = useOrgBillingMode(); - const { showUsageView } = useFeatureFlags(); const getOrgURL = useGetOrgURL(); const userFullName = user?.fullName || user?.name || "..."; @@ -74,7 +72,7 @@ export default function OrganizationSelector(p: OrganizationSelectorProps) { BillingMode.showUsageBasedBilling(userBillingMode) && !user?.additionalData?.isMigratedToTeamOnlyAttribution; - const showUsageForOrg = currentOrg.data?.isOwner && (orgBillingMode?.mode === "usage-based" || showUsageView); + const showUsageForOrg = currentOrg.data?.isOwner && orgBillingMode?.mode === "usage-based"; if (showUsageForPersonalAccount || showUsageForOrg) { linkEntries.push({