Skip to content

Commit 52b0c60

Browse files
authored
Disable onboarding-survey #4452
Disable onboarding-survey
2 parents f38f1ed + 8c1dbeb commit 52b0c60

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

portal/src/OnboardingRedirect.tsx

+11-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,17 @@ const OnboardingRedirect: React.VFC = function OnboardingRedirect() {
3030
if (viewer === undefined || viewer === null) {
3131
return;
3232
}
33-
if (
34-
(apps === null || apps.length === 0) &&
35-
!viewer.isOnboardingSurveyCompleted
36-
) {
37-
navigate("/onboarding-survey");
33+
// NOTE(onboarding-survey): disabled
34+
//if (
35+
// (apps === null || apps.length === 0) &&
36+
// !viewer.isOnboardingSurveyCompleted
37+
//) {
38+
// navigate("/onboarding-survey");
39+
//} else {
40+
// navigate("/");
41+
//}
42+
if (apps === null || apps.length === 0) {
43+
navigate("/projects/create");
3844
} else {
3945
navigate("/");
4046
}

portal/src/graphql/portal/AppsScreen.tsx

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useCallback, useMemo, useEffect } from "react";
1+
import React, { useCallback, useMemo } from "react";
22
import { Link, useNavigate } from "react-router-dom";
33
import { FormattedMessage } from "@oursky/react-messageformat";
44
import { DefaultEffects, Text } from "@fluentui/react";
@@ -92,14 +92,15 @@ const AppList: React.VFC<AppListProps> = function AppList(props: AppListProps) {
9292
const projectQuotaReached = isProjectQuotaReached(viewer);
9393
const navigate = useNavigate();
9494

95-
useEffect(() => {
96-
if (
97-
(apps === null || apps.length === 0) &&
98-
!viewer?.isOnboardingSurveyCompleted
99-
) {
100-
navigate("/onboarding-survey");
101-
}
102-
}, [apps, viewer, navigate]);
95+
// NOTE(onboarding-survey): disabled
96+
//useEffect(() => {
97+
// if (
98+
// (apps === null || apps.length === 0) &&
99+
// !viewer?.isOnboardingSurveyCompleted
100+
// ) {
101+
// navigate("/onboarding-survey");
102+
// }
103+
//}, [apps, viewer, navigate]);
103104

104105
const onCreateClick = useCallback(
105106
(e) => {

0 commit comments

Comments
 (0)