1- import { useNavigate , Route , Routes } from "react-router-dom" ;
1+ import { useNavigate , Route , Routes , useLocation } from "react-router-dom" ;
22import _ from "lodash" ;
33import React , { useContext , useEffect , useState } from "react" ;
44import { useDispatch } from "react-redux" ;
@@ -20,6 +20,7 @@ import { INTAKE_FORM_ROUTES as FIND_ME_DATA_INTAKE_FORM_ROUTES } from "./constan
2020import { INTAKE_FORM_ROUTES as DATA_ADVISORY_INTAKE_FORM_ROUTES } from "./constants/products/DataAdvisory" ;
2121import { INTAKE_FORM_ROUTES as WEBSITE_DESIGN_INTAKE_FORM_ROUTES } from "./constants/products/WebsiteDesign" ;
2222import { INTAKE_FORM_ROUTES as WEBSITE_DESIGN_LEGACY_INTAKE_FORM_ROUTES } from "./constants/products/WebsiteDesignLegacy" ;
23+ import { BUG_HUNT_ROUTE } from "./constants/products/BugHunt" ;
2324import { getIntakeFormChallenges } from "./services/challenge" ;
2425import SelectWorkType from "./routes/SelectWorkType" ;
2526import DataExploration from "./routes/Products/DataExploration" ;
@@ -33,6 +34,7 @@ import { profileContext, WorkType } from "../src-ts";
3334export default function IntakeForm ( ) {
3435
3536 const dispatch = useDispatch ( ) ;
37+ const location = useLocation ( ) ;
3638 const [ isLoading , setIsLoading ] = useState ( false ) ;
3739 const navigate = useNavigate ( )
3840
@@ -141,7 +143,8 @@ export default function IntakeForm() {
141143 } ;
142144
143145 const syncSavedData = ( savedData ) => {
144- if ( ! savedData ) return ;
146+ const isBugHuntRoute = location . pathname . indexOf ( BUG_HUNT_ROUTE ) > - 1
147+ if ( ! savedData || isBugHuntRoute ) return ;
145148 const { form, progress } = savedData ;
146149 if ( form ) dispatch ( saveForm ( form ) ) ;
147150 if ( progress ?. currentStep ) {
0 commit comments