Skip to content

Commit a69c12d

Browse files
committed
Use ff to display
1 parent 1a31bc4 commit a69c12d

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

components/dashboard/src/teams/OrgSettingsPage.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@ function getOrgSettingsMenu(params: {
102102
title: "Policies",
103103
link: [`/settings/policy`],
104104
},
105-
{
106-
title: "Onboarding",
107-
link: [`/settings/onboarding`],
108-
},
109105
];
110106
if (!isDedicatedInstallation) {
111107
result.push(

components/dashboard/src/user-settings/Preferences.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { LoadingButton } from "@podkit/buttons/LoadingButton";
2626
import { useOrgSettingsQuery } from "../data/organizations/org-settings-query";
2727
import Alert from "../components/Alert";
2828
import { GETTING_STARTED_DISMISSAL_KEY } from "../workspaces/Workspaces";
29+
import { useFeatureFlag } from "../data/featureflag-query";
2930

3031
export type IDEChangedTrackLocation = "workspace_list" | "workspace_start" | "preferences";
3132

@@ -45,6 +46,8 @@ export default function Preferences() {
4546
const [timeoutUpdating, setTimeoutUpdating] = useState(false);
4647
const [creationError, setCreationError] = useState<Error>();
4748

49+
const isEnterpriseOnboardingEnabled = useFeatureFlag("enterprise_onboarding_enabled");
50+
4851
const saveDotfileRepo = useCallback(
4952
async (e) => {
5053
e.preventDefault();
@@ -161,11 +164,15 @@ export default function Preferences() {
161164
Reset Options
162165
</Button>
163166

164-
<Heading3 className="mt-12">Organization onboarding</Heading3>
165-
<Subheading>If you dismissed the onboarding process, you can restart it here.</Subheading>
166-
<Button className="mt-4" variant="secondary" onClick={restartOrgOnboarding}>
167-
Restart Onboarding
168-
</Button>
167+
{isEnterpriseOnboardingEnabled && (
168+
<>
169+
<Heading3 className="mt-12">Organization onboarding</Heading3>
170+
<Subheading>If you dismissed the onboarding process, you can restart it here.</Subheading>
171+
<Button className="mt-4" variant="secondary" onClick={restartOrgOnboarding}>
172+
Restart Onboarding
173+
</Button>
174+
</>
175+
)}
169176

170177
<ThemeSelector className="mt-12" />
171178

components/dashboard/src/workspaces/Workspaces.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import { useInstallationConfiguration } from "../data/installation/default-works
3636
import { useUpdateCurrentUserMutation } from "../data/current-user/update-mutation";
3737
import { useUserLoader } from "../hooks/use-user-loader";
3838
import Tooltip from "../components/Tooltip";
39+
import { useFeatureFlag } from "../data/featureflag-query";
3940

4041
export const GETTING_STARTED_DISMISSAL_KEY = "workspace-list-getting-started";
4142

@@ -80,6 +81,8 @@ const WorkspacesPage: FunctionComponent = () => {
8081
const { data: installationConfig } = useInstallationConfiguration();
8182
const isDedicatedInstallation = !!installationConfig?.isDedicatedInstallation;
8283

84+
const isEnterpriseOnboardingEnabled = useFeatureFlag("enterprise_onboarding_enabled");
85+
8386
const { filteredActiveWorkspaces, filteredInactiveWorkspaces } = useMemo(() => {
8487
const filteredActiveWorkspaces = activeWorkspaces.filter(
8588
(info) =>
@@ -151,7 +154,8 @@ const WorkspacesPage: FunctionComponent = () => {
151154
subtitle="Manage, start and stop your personal development environments in the cloud."
152155
/>
153156

154-
{isDedicatedInstallation &&
157+
{isEnterpriseOnboardingEnabled &&
158+
isDedicatedInstallation &&
155159
showGettingStarted &&
156160
!user?.profile?.coachmarksDismissals[GETTING_STARTED_DISMISSAL_KEY] && (
157161
<>

0 commit comments

Comments
 (0)