diff --git a/apps/eo_web/src/components/ThankYou.tsx b/apps/eo_web/src/components/ThankYou.tsx index 4dd055d1..fbe76a3c 100644 --- a/apps/eo_web/src/components/ThankYou.tsx +++ b/apps/eo_web/src/components/ThankYou.tsx @@ -38,11 +38,7 @@ export const ThankYou = ({ const { mutate } = useMutation({ mutationFn: mutationFunction, mutationKey: mutationKey, - onSuccess: () => { - setIsLoading(false); - resetSurveyStore(); - }, - onError: () => { + onSettled: () => { setIsLoading(false); resetSurveyStore(); resetProfilingStore(); @@ -52,6 +48,9 @@ export const ThankYou = ({ useMount(() => { if (mutateOnMount) { mutate(mutationsParams); + } else { + resetSurveyStore(); + resetProfilingStore(); } }); diff --git a/apps/eo_web/src/screens/Cancer/CancerSurveyThankYou.tsx b/apps/eo_web/src/screens/Cancer/CancerSurveyThankYou.tsx index 527a8931..414705f8 100644 --- a/apps/eo_web/src/screens/Cancer/CancerSurveyThankYou.tsx +++ b/apps/eo_web/src/screens/Cancer/CancerSurveyThankYou.tsx @@ -20,6 +20,7 @@ const flowsWithSmallFooter: FlowType[] = [ Flows.employer_center, Flows.inova, Flows.uva, + Flows.mass_retirees, // The flows related to resources_center_1/2 Flows.cancer_buddy, diff --git a/apps/eo_web/src/screens/ProfilingThankYou.tsx b/apps/eo_web/src/screens/ProfilingThankYou.tsx index bbf7c6ae..3e000d39 100644 --- a/apps/eo_web/src/screens/ProfilingThankYou.tsx +++ b/apps/eo_web/src/screens/ProfilingThankYou.tsx @@ -41,6 +41,7 @@ const flowsWithSmallFooter: FlowType[] = [ export const ProfilingThankYou = () => { const { flow, account, usePayment, channel } = useProfilingStore(); + const [searchParams] = useSearchParams(); const submission_id = searchParams.get("submission_id") ?? ""; const navigate = useNavigate(); @@ -71,8 +72,8 @@ export const ProfilingThankYou = () => { }} > You’ll be able to review your initial, personalized, clinician-approved - care plan within 24 hours. When your care plan is ready, we will send you - a text message and an email with a link to{" "} + care plan within 24 hours. When your care plan is ready, we will send + you a text message and an email with a link to{" "} log into your account. diff --git a/apps/eo_web/src/screens/Senior/SeniorSurveyThankYou.tsx b/apps/eo_web/src/screens/Senior/SeniorSurveyThankYou.tsx index ee6db8e6..6646159e 100644 --- a/apps/eo_web/src/screens/Senior/SeniorSurveyThankYou.tsx +++ b/apps/eo_web/src/screens/Senior/SeniorSurveyThankYou.tsx @@ -5,12 +5,16 @@ import { ThankYou } from "~/components"; import { FAQs } from "~/components/FAQs"; import { HowEOWorks } from "~/components/HowEOWorks"; import { LayoutDefault } from "~/layouts"; +import { Footer } from "~/layouts/Footer"; import { FooterFull } from "~/layouts/FooterFull"; -import { type Channel } from "~/stores/useProfilingStore"; +import { Flows, type Channel, type FlowType } from "~/stores/useProfilingStore"; import { useSurveyStore } from "~/stores/useSurveyStore"; +const flowsWithSmallFooter: FlowType[] = [Flows.mass_retirees]; + export const SeniorSurveyThankYou = () => { - const { email, phase, channel } = useSurveyStore(); + const { flow, email, phase, channel } = useSurveyStore(); + const [searchParams] = useSearchParams(); const submission_id = searchParams.get("submission_id") ?? ""; @@ -32,9 +36,14 @@ export const SeniorSurveyThankYou = () => { channel: channel as Channel, }} /> - - - + + + + {flowsWithSmallFooter.includes(flow) ? ( +