diff --git a/apps/eo_web/.env.example b/apps/eo_web/.env.example index abf048b9..df530e61 100644 --- a/apps/eo_web/.env.example +++ b/apps/eo_web/.env.example @@ -7,7 +7,5 @@ ZUKO_SLUG_ID_PROCESS_START= CANCER_PROFILE_PATIENT_ID= CANCER_PROFILE_CAREGIVER_ID= CANCER_SURVEY_FORM= -ATHLETE_PROFILE_FORM= -ATHLETE_SURVEY_FORM= API_URL= API_LARAVEL= diff --git a/apps/eo_web/src/App.tsx b/apps/eo_web/src/App.tsx index be970bbd..f72ffaba 100644 --- a/apps/eo_web/src/App.tsx +++ b/apps/eo_web/src/App.tsx @@ -29,8 +29,6 @@ interface EnvironmentsConfigs { CANCER_PROFILE_CAREGIVER_ID: string; CANCER_PATIENT_SURVEY_ID: string; CANCER_CAREGIVER_SURVEY_ID: string; - ATHLETE_PROFILE_FORM: string; - ATHLETE_SURVEY_FORM: string; SENIOR_INTRO_QUESTION_PATIENT_ID: string; SENIOR_INTRO_QUESTION_CAREGIVER_ID: string; SENIOR_PROFILE_PATIENT_ID: string; diff --git a/apps/eo_web/src/api/useApi.ts b/apps/eo_web/src/api/useApi.ts index ad7d4d33..9ee83f51 100644 --- a/apps/eo_web/src/api/useApi.ts +++ b/apps/eo_web/src/api/useApi.ts @@ -1,4 +1,3 @@ -import { apiElixir, apiLaravel } from "~/api/axios"; import { type AvoidPresentation, type Maladies, @@ -7,6 +6,7 @@ import { type ThcProductPreferences, type WorseSymptomsMoment, } from "~/api/PrePlanTypes"; +import { apiElixir, apiLaravel } from "~/api/axios"; import { useProfileStore, type Profile } from "~/stores/useProfileStore"; import { type FlowType } from "~/stores/useProfilingStore"; @@ -155,11 +155,6 @@ export const useApi = () => { data, ); - const postAthleteSurveyFormSubmission = async (data: object) => - await apiLaravel.post< - LaravelSuccessBase | LaravelErrorValidation - >("/api/athletes/survey", data); - const postSeniorFormSubmission = async (data: object) => await apiLaravel.post< LaravelSuccessBase | LaravelErrorValidation @@ -191,7 +186,6 @@ export const useApi = () => { eligibleEmail, postCancerFormSubmission, postCancerSurveyFormSubmission, - postAthleteSurveyFormSubmission, postSeniorFormSubmission, postSeniorSurveyFormSubmission, surveyStatus, diff --git a/apps/eo_web/src/configs/env.ts b/apps/eo_web/src/configs/env.ts index 1627854f..e20cce0f 100644 --- a/apps/eo_web/src/configs/env.ts +++ b/apps/eo_web/src/configs/env.ts @@ -18,11 +18,6 @@ export const CANCER_PATIENT_SURVEY_ID = export const CANCER_CAREGIVER_SURVEY_ID = window.data.getEnv("CANCER_CAREGIVER_SURVEY_ID") || 233415093176152; -export const ATHLETE_PROFILE_FORM = - window.data.getEnv("ATHLETE_PROFILE_FORM") || 233115151709146; -export const ATHLETE_SURVEY_FORM = - window.data.getEnv("ATHLETE_SURVEY_FORM") || 233164188186664; - export const SENIOR_INTRO_QUESTION_PATIENT_ID = window.data.getEnv("SENIOR_INTRO_QUESTION_PATIENT_ID") || 233233204641040; export const SENIOR_INTRO_QUESTION_CAREGIVER_ID = diff --git a/apps/eo_web/src/router/Router.tsx b/apps/eo_web/src/router/Router.tsx index 97fa5175..926149e0 100644 --- a/apps/eo_web/src/router/Router.tsx +++ b/apps/eo_web/src/router/Router.tsx @@ -3,8 +3,6 @@ import { Route, Routes } from "react-router-dom"; import { ROUTES } from "~/router/routes"; import { AccountCreation } from "~/screens/AccountCreation"; -import { AthleteSurveyForm } from "~/screens/Athlete/AthleteSurveyForm"; -import { AthleteSurveyThankYou } from "~/screens/Athlete/AthleteSurveyThankYou"; import { CancerSurveyThankYou } from "~/screens/Cancer/CancerSurveyThankYou"; import { Profiling } from "~/screens/Cancer/Profiling"; import { SurveyForm } from "~/screens/Cancer/SurveyForm"; @@ -113,13 +111,6 @@ export const Router = () => { path={ROUTES.cancerSurveyThankYou} /> - {/* ATHLETES */} - } path={ROUTES.athleteSurvey} /> - } - path={ROUTES.athleteSurveyThankYou} - /> - {/* SENIOR */} } path={ROUTES.seniorForm} /> } path={ROUTES.seniorSurvey} /> diff --git a/apps/eo_web/src/router/routes.tsx b/apps/eo_web/src/router/routes.tsx index b1791a57..49dca0ef 100644 --- a/apps/eo_web/src/router/routes.tsx +++ b/apps/eo_web/src/router/routes.tsx @@ -30,10 +30,6 @@ export const ROUTES = { cancerSurvey: "/cancer/survey", cancerSurveyThankYou: "/cancer/survey-thank-you", - // Athletes PATH - athleteSurvey: "/athletes/survey", - athleteSurveyThankYou: "athletes/survey-thank-you", - // Senior PATH seniorForm: "/senior/profiling", seniorSurvey: "/senior/survey", diff --git a/apps/eo_web/src/screens/Athlete/AthleteSurveyForm.tsx b/apps/eo_web/src/screens/Athlete/AthleteSurveyForm.tsx deleted file mode 100644 index a4238fee..00000000 --- a/apps/eo_web/src/screens/Athlete/AthleteSurveyForm.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { useEffect } from "react"; -import { useSearchParams } from "react-router-dom"; - -import { ATHLETE_SURVEY_FORM } from "~/configs/env"; -import { jotformScript } from "~/helpers/jotform_script"; -import { LayoutDefault } from "~/layouts"; - - - - - -export const AthleteSurveyForm = () => { - const [searchParams] = useSearchParams(); - - const email = searchParams.get("email") || ""; - const symptoms = searchParams.get("symptoms") || ""; - - useEffect(() => { - jotformScript(ATHLETE_SURVEY_FORM); - }, []); - return ( - -
- -
-
- ); -}; diff --git a/apps/eo_web/src/screens/Athlete/AthleteSurveyThankYou.tsx b/apps/eo_web/src/screens/Athlete/AthleteSurveyThankYou.tsx deleted file mode 100644 index 57772b0c..00000000 --- a/apps/eo_web/src/screens/Athlete/AthleteSurveyThankYou.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import { useMutation } from "@tanstack/react-query"; -import axios from "axios"; -import { useNavigate, useSearchParams } from "react-router-dom"; -import { toast } from "react-toastify"; - -import { Typography } from "@eo/ui"; - -import { useApi } from "~/api/useApi"; -import { AllDonePanel } from "~/components/AllDonePanel"; -import { FAQs } from "~/components/FAQs"; -import { HowEOWorks } from "~/components/HowEOWorks"; -import { useMount } from "~/hooks/useMount"; -import { LayoutDefault } from "~/layouts"; -import { FooterFull } from "~/layouts/FooterFull"; - - -export const AthleteSurveyThankYou = () => { - const [searchParams] = useSearchParams(); - - const submission_id = searchParams.get("submission_id") || ""; - - const navigate = useNavigate(); - - if (!submission_id) { - navigate("/"); - } - - const { postAthleteSurveyFormSubmission } = useApi(); - - const { mutate } = useMutation({ - mutationFn: postAthleteSurveyFormSubmission, - mutationKey: ["postAthleteSurveyFormSubmission", submission_id], - onError: (result) => { - if (axios.isAxiosError(result)) { - if (result.response?.status !== 200) { - toast.error("Something went wrong"); - } - } else { - toast.error("Something went wrong"); - } - }, - }); - - useMount(() => mutate({ submission_id })); - - return ( - - - - We received your feedback!
-
- Thank you!
-
- Have questions? We’re here. Email support@eo.care, call{" "} - 888-823-6143, or{" "} - - schedule a chat - {" "} - with a member of our team. -
-
- - - -
- ); -};