Skip to content

Commit 0058d68

Browse files
authored
[dashboard] Remove superfluous usage_view feature flag (#17285)
1 parent ae37d8c commit 0058d68

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

components/dashboard/src/contexts/FeatureFlagContext.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ type FeatureFlagsType = {
2020

2121
const defaultFeatureFlags = {
2222
startWithOptions: false,
23-
showUsageView: false,
2423
showUseLastSuccessfulPrebuild: false,
2524
usePublicApiWorkspacesService: false,
2625
enablePersonalAccessTokens: false,
@@ -40,7 +39,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
4039
const { project } = useContext(ProjectContext);
4140
const currentOrg = useCurrentOrg();
4241
const [startWithOptions, setStartWithOptions] = useState<boolean>(false);
43-
const [showUsageView, setShowUsageView] = useState<boolean>(false);
4442
const [showUseLastSuccessfulPrebuild, setShowUseLastSuccessfulPrebuild] = useState<boolean>(false);
4543
const [enablePersonalAccessTokens, setPersonalAccessTokensEnabled] = useState<boolean>(false);
4644
const [usePublicApiWorkspacesService, setUsePublicApiWorkspacesService] = useState<boolean>(false);
@@ -55,7 +53,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
5553
(async () => {
5654
const featureFlags: FeatureFlagConfig = {
5755
start_with_options: { defaultValue: false, setter: setStartWithOptions },
58-
usage_view: { defaultValue: false, setter: setShowUsageView },
5956
showUseLastSuccessfulPrebuild: { defaultValue: false, setter: setShowUseLastSuccessfulPrebuild },
6057
personalAccessTokensEnabled: { defaultValue: false, setter: setPersonalAccessTokensEnabled },
6158
publicApiExperimentalWorkspaceService: {
@@ -107,7 +104,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
107104
const flags = useMemo(() => {
108105
return {
109106
startWithOptions,
110-
showUsageView,
111107
showUseLastSuccessfulPrebuild,
112108
enablePersonalAccessTokens,
113109
usePublicApiWorkspacesService,
@@ -123,7 +119,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
123119
newSignupFlow,
124120
oidcServiceEnabled,
125121
orgGitAuthProviders,
126-
showUsageView,
127122
showUseLastSuccessfulPrebuild,
128123
startWithOptions,
129124
usePublicApiWorkspacesService,

components/dashboard/src/menu/OrganizationSelector.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { OrgIcon, OrgIconProps } from "../components/org-icon/OrgIcon";
1010
import { useCurrentUser } from "../user-context";
1111
import { BillingMode } from "@gitpod/gitpod-protocol/lib/billing-mode";
1212
import { useUserBillingMode } from "../data/billing-mode/user-billing-mode-query";
13-
import { useFeatureFlags } from "../contexts/FeatureFlagContext";
1413
import { useCurrentOrg, useOrganizations } from "../data/organizations/orgs-query";
1514
import { useOrgBillingMode } from "../data/billing-mode/org-billing-mode-query";
1615
import { useLocation } from "react-router";
@@ -23,7 +22,6 @@ export default function OrganizationSelector(p: OrganizationSelectorProps) {
2322
const currentOrg = useCurrentOrg();
2423
const { data: userBillingMode } = useUserBillingMode();
2524
const { data: orgBillingMode } = useOrgBillingMode();
26-
const { showUsageView } = useFeatureFlags();
2725
const getOrgURL = useGetOrgURL();
2826

2927
const userFullName = user?.fullName || user?.name || "...";
@@ -74,7 +72,7 @@ export default function OrganizationSelector(p: OrganizationSelectorProps) {
7472
BillingMode.showUsageBasedBilling(userBillingMode) &&
7573
!user?.additionalData?.isMigratedToTeamOnlyAttribution;
7674

77-
const showUsageForOrg = currentOrg.data?.isOwner && (orgBillingMode?.mode === "usage-based" || showUsageView);
75+
const showUsageForOrg = currentOrg.data?.isOwner && orgBillingMode?.mode === "usage-based";
7876

7977
if (showUsageForPersonalAccount || showUsageForOrg) {
8078
linkEntries.push({

0 commit comments

Comments
 (0)