chore: Signposting progress should be hidden when user generates a page (#7883)

Fixes: #7660
This commit is contained in:
balajisoundar 2021-09-28 11:58:18 +05:30 committed by GitHub
parent b972eda083
commit 287f7e2de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,10 @@ import { Bold, Label, SelectWrapper } from "./styles";
import { GeneratePagePayload } from "./types";
import Icon from "components/ads/Icon";
import { ReduxActionTypes } from "constants/ReduxActionConstants";
import { getIsFirstTimeUserOnboardingEnabled } from "selectors/onboardingSelectors";
import {
getFirstTimeUserOnboardingComplete,
getIsFirstTimeUserOnboardingEnabled,
} from "selectors/onboardingSelectors";
// ---------- Styles ----------
@ -247,6 +250,9 @@ function GeneratePageForm() {
const isFirstTimeUserOnboardingEnabled = useSelector(
getIsFirstTimeUserOnboardingEnabled,
);
const isFirstTimeUserOnboardingComplete = useSelector(
getFirstTimeUserOnboardingComplete,
);
const onSelectDataSource = useCallback(
(
@ -512,6 +518,12 @@ function GeneratePageForm() {
payload: "",
});
}
if (isFirstTimeUserOnboardingComplete) {
dispatch({
type: ReduxActionTypes.SET_FIRST_TIME_USER_ONBOARDING_COMPLETE,
payload: false,
});
}
};
const handleFormSubmit = () => {