Skip to content

Commit

Permalink
remove old feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
nilscox committed Oct 3, 2024
1 parent 9dddb6b commit 0a25e54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
11 changes: 2 additions & 9 deletions src/layouts/main/main-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { Link, LinkButton } from 'src/components/link';
import LogoKoyeb from 'src/components/logo-koyeb.svg?react';
import Logo from 'src/components/logo.svg?react';
import { OrganizationAvatar } from 'src/components/organization-avatar';
import { useFeatureFlag } from 'src/hooks/feature-flag';
import { useLocation } from 'src/hooks/router';
import { useLocalStorage, useSessionStorage } from 'src/hooks/storage';
import { useThemeModeOrPreferred } from 'src/hooks/theme';
Expand Down Expand Up @@ -210,14 +209,8 @@ const isReadyEvent = createValidationGuard(z.object({ ready: z.literal(true) }))
function usePageContext(): PageContextProps {
const { data: user } = useUserQuery();
const { pageContextBaseUrl } = getConfig();
const pageContextFlag = useFeatureFlag('page-context');

const enabled = [
//
pageContextBaseUrl !== undefined,
user?.flags.includes('ADMIN'),
pageContextFlag,
].every(Boolean);

const enabled = Boolean(pageContextBaseUrl !== undefined && user?.flags.includes('ADMIN'));

const [expanded, setExpanded] = useLocalStorage<boolean>('page-context-expanded');

Expand Down
4 changes: 1 addition & 3 deletions src/modules/deployment/deployment-logs/build-steps.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import clsx from 'clsx';

import { ComputeDeployment, DeploymentBuildStep } from 'src/api/model';
import { useFeatureFlag } from 'src/hooks/feature-flag';
import { useNow } from 'src/hooks/timers';
import { Translate } from 'src/intl/translate';

Expand All @@ -14,10 +13,9 @@ type BuildStepsProps = {
};

export function BuildSteps({ deployment }: BuildStepsProps) {
const buildStepsFlag = useFeatureFlag('build-steps');
const steps = deployment.build?.steps;

if (!buildStepsFlag || steps === undefined) {
if (steps === undefined) {
return null;
}

Expand Down

0 comments on commit 0a25e54

Please sign in to comment.