Skip to content

Commit

Permalink
Disable onboarding-survey #4452
Browse files Browse the repository at this point in the history
Disable onboarding-survey
  • Loading branch information
tung2744 committed Jul 12, 2024
2 parents f38f1ed + 8c1dbeb commit 52b0c60
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
16 changes: 11 additions & 5 deletions portal/src/OnboardingRedirect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@ const OnboardingRedirect: React.VFC = function OnboardingRedirect() {
if (viewer === undefined || viewer === null) {
return;
}
if (
(apps === null || apps.length === 0) &&
!viewer.isOnboardingSurveyCompleted
) {
navigate("/onboarding-survey");
// NOTE(onboarding-survey): disabled
//if (
// (apps === null || apps.length === 0) &&
// !viewer.isOnboardingSurveyCompleted
//) {
// navigate("/onboarding-survey");
//} else {
// navigate("/");
//}
if (apps === null || apps.length === 0) {
navigate("/projects/create");
} else {
navigate("/");
}
Expand Down
19 changes: 10 additions & 9 deletions portal/src/graphql/portal/AppsScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useMemo, useEffect } from "react";
import React, { useCallback, useMemo } from "react";
import { Link, useNavigate } from "react-router-dom";
import { FormattedMessage } from "@oursky/react-messageformat";
import { DefaultEffects, Text } from "@fluentui/react";
Expand Down Expand Up @@ -92,14 +92,15 @@ const AppList: React.VFC<AppListProps> = function AppList(props: AppListProps) {
const projectQuotaReached = isProjectQuotaReached(viewer);
const navigate = useNavigate();

useEffect(() => {
if (
(apps === null || apps.length === 0) &&
!viewer?.isOnboardingSurveyCompleted
) {
navigate("/onboarding-survey");
}
}, [apps, viewer, navigate]);
// NOTE(onboarding-survey): disabled
//useEffect(() => {
// if (
// (apps === null || apps.length === 0) &&
// !viewer?.isOnboardingSurveyCompleted
// ) {
// navigate("/onboarding-survey");
// }
//}, [apps, viewer, navigate]);

const onCreateClick = useCallback(
(e) => {
Expand Down

0 comments on commit 52b0c60

Please sign in to comment.