Skip to content

Commit

Permalink
feat: update thank you pages
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoycoechea-lightit committed Jan 12, 2024
1 parent c5820e7 commit 5248ed8
Show file tree
Hide file tree
Showing 11 changed files with 247 additions and 151 deletions.
121 changes: 121 additions & 0 deletions apps/eo_web/dist/assets/main-09aa2b29.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

121 changes: 0 additions & 121 deletions apps/eo_web/dist/assets/main-2579bafd.js

This file was deleted.

6 changes: 3 additions & 3 deletions apps/eo_web/dist/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
"src": "../../packages/ui/src/assets/avatar.svg"
},
"src/main.css": {
"file": "assets/main-d2f0bf46.css",
"file": "assets/main-0d348634.css",
"src": "src/main.css"
},
"src/main.tsx": {
"assets": [
"assets/UploadFile-694e44b5.svg"
],
"css": [
"assets/main-d2f0bf46.css"
"assets/main-0d348634.css"
],
"file": "assets/main-2579bafd.js",
"file": "assets/main-09aa2b29.js",
"isEntry": true,
"src": "src/main.tsx"
}
Expand Down
11 changes: 8 additions & 3 deletions apps/eo_web/src/components/FAQs.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { Typography } from '@eo/ui'
import React from 'react'
import { faqs } from '~/copy/copy'
import { faqs, pilotFaqs } from '~/copy/copy'
import { Collapsible } from './Collapsible'

export const FAQs = () => {
interface FAQsProps {
pilot?: boolean
}

export const FAQs = ({ pilot = false }: FAQsProps) => {
const faqList = pilot ? pilotFaqs : faqs
return (
<section className="px-6 py-12 md:mx-0 md:my-[100px]">
<div className="mx-auto my-0 flex max-w-[900px] flex-col">
Expand All @@ -15,7 +20,7 @@ export const FAQs = () => {
FAQs
</Typography>
<div className="flex flex-col gap-6">
{faqs.map(({ title, content }) => (
{faqList.map(({ title, content }) => (
<Collapsible key={title} title={title} active={false}>
<Typography className="text-[18px] leading-[26px] text-gray-800">
{content}
Expand Down
8 changes: 6 additions & 2 deletions apps/eo_web/src/components/HowEOWorks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ import { CarrouselItems } from "~/copy/copy";
import { EoCarousel } from "./Carousel";


export const HowEOWorks = () => {
interface HowEOWorksProps {
pilot?: boolean
}

export const HowEOWorks = ({ pilot = false }: HowEOWorksProps) => {
return (
<section className="bg-white px-6 py-12 md:px-[50px] md:py-[100px] ">
<Typography font="bold" variant="large" className="mb-20 text-center">
How eo care plans work
{pilot ? "How the eo pilot works" : "How eo care plans work"}
</Typography>
<EoCarousel>
{CarrouselItems.map(({ title, content, step, icon: Icon }) => (
Expand Down
84 changes: 84 additions & 0 deletions apps/eo_web/src/copy/copy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,90 @@ export const CarrouselItems = [
},
];

export const pilotFaqs: Copy[] = [
{
title: "How much does eo cost?",
content: "Your care is completely free. And we’ll reimburse you for the cost of your products. Just send a picture of your receipt to [email protected] each time you make a purchase and we’ll provide you with an Amazon gift card in an equal amount.",
},
{
title: "Do I order the products that are included in my care plan or do you do it for me?",
content: "After you’ve approved them, we’ll order your products for you and let you know when they’re ready for pick-up - and how much they cost.",
},
{
title: "What should I bring with me when I pick-up my products?",
content: "Bring your valid medical card, a state I.D. or driver’s license and a debit card or enough cash to pay for products.",
},
{
title: "What if I don’t yet have a physical medical card?",
content: "Your care team can provide you with a valid state patient ID number to provide when you purchase and pick-up your products.",
},
{
title: "How long should it take my clinical and member services teams to respond to a message, email or phone question/ inquiry?",
content: "No more than 24 hours and typically within 2-3 hours.",
},
{
title: "Why can’t I see my initial care plan as soon as I submit my profile information?",
content: "Every profile submitted and piece of feedback provided is initially assessed by our proprietary data model and a draft care plan or care plan update is created. That plan is then closely reviewed and edited as needed by a licensed eo clinician. This can take as long as 24 hours or this can take as little as an hour, depending on the complexity of your profile, your care plan and clinician availability.",
},
{
title: "How do you decide which products, doses and times of use are most right for me?",
content: (
<>
The eo data model and your clinical team base all recommendations on
relevant aspects of your medical history, cannabis use history, your
daily schedule and the feedback you provide as you use your care plan.
<br />
<br />
The model and your team also considers the profiles, experiences and
feedback provided by other eo patients like you and the recommendations
of our proprietary data model. And your clinical team (of course) always
draws upon their extensive cannabis treatment and research experience to
provide the best possible care for you.
</>
),
},
{
title: "What happens if I miss a use session entirely?",
content: "Just begin the next session as scheduled!",
},
{
title: "What happens if I’m late starting a use session?",
content: "If you’re less than 30 minutes late, go ahead and begin the session (also be sure to begin the next session at the originally scheduled time). If you’re more than 30 minutes late just wait for the next session to begin.",
},
{
title: "What happens if I miss an opportunity to provide feedback?",
content: "Needless to say, the more feedback you provide, the better we can care for you. However, we know sometimes schedules change and life happens. If you can’t provide feedback when prompted, don’t worry. Just keep going as guided.",
},
{
title: "How long should it take to get my cannabis regimen “right”?",
content: (
<>
Everyone is different when it comes to the time it takes to reach
satisfaction with a care plan. For some, all it takes is a few days
or a week or two. For others, it can take longer.
<br />
<br />
It’s important to note, however, that very few people retain a static
relationship to cannabis for long periods of time. Products, doses and
times of use typically change as your reasons for use, symptoms, cannabis
tolerance, body and daily schedule evolves.
<br />
<br />
As your feedback and needs change, we’ll be with you to alter and
optimize your care plan, guide your care and answer your questions.
</>
),
},
{
title: "Can I use a different dispensary or delivery provider than the one you’ve recommended?",
content: "The answer is an honest “maybe”. If you’d like to make a change just email us at [email protected] or call 877-707-0706. We’ll do everything we can to accommodate your request.",
},
{
title: "What happens if I run out of a particular product?",
content: "No problem. Just email us at [email protected] or call 877-707-0706. We’ll update your care plan in the very near term to accommodate the absence of that product if/as appropriate and coordinate the ordering of the needed product or a responsible replacement.",
},
];

export const faqs: Copy[] = [
{
title: "How much does eo cost?",
Expand Down
15 changes: 4 additions & 11 deletions apps/eo_web/src/router/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { ProfilingOneRedirect } from "~/screens/profiling/ProfilingOneRedirect";
import { ProfilingTwo } from "~/screens/profiling/ProfilingTwo";
import { ProfilingTwoRedirect } from "~/screens/profiling/ProfilingTwoRedirect";
import { ProtectedRoute } from "./ProtectedRoute";
import { CancerSurveyThankYou } from "~/screens/Cancer/CancerSurveyThankYou";


export const Router = () => {
Expand Down Expand Up @@ -95,26 +96,18 @@ export const Router = () => {
<Route element={<ProfilingThankYou />} path={ROUTES.profilingThankYou} />

{/* CANCER */}

<Route element={<Profiling />} path={ROUTES.cancerForm} />

<Route element={<SurveyForm />} path={ROUTES.cancerSurvey} />
<Route element={<SeniorSurveyThankYou />} path={ROUTES.cancerSurveyThankYou} />
<Route element={<CancerSurveyThankYou />} path={ROUTES.cancerSurveyThankYou} />

{/* ATHLETES */}
<Route element={<AthleteSurveyForm />} path={ROUTES.athleteSurvey} />
<Route
element={<AthleteSurveyThankYou />}
path={ROUTES.athleteSurveyThankYou}
/>
<Route element={<AthleteSurveyThankYou />} path={ROUTES.athleteSurveyThankYou} />

{/* SENIOR */}
<Route element={<SeniorProfiling />} path={ROUTES.seniorForm} />
<Route element={<SeniorSurveyForm />} path={ROUTES.seniorSurvey} />
<Route
element={<SeniorSurveyThankYou />}
path={ROUTES.seniorSurveyThankYou}
/>
<Route element={<SeniorSurveyThankYou />} path={ROUTES.seniorSurveyThankYou} />
</Routes>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,27 @@ import { AllDonePanel } from "~/components/AllDonePanel";
import { HowEOWorks } from "~/components/HowEOWorks";
import { FAQs } from "~/components/FAQs";
import { FooterFull } from "~/layouts/FooterFull";
import { useProfilingStore } from "~/stores/useProfilingStore";

export const SurveyThankYou = () => {

export const CancerSurveyThankYou = () => {
const [searchParams] = useSearchParams();

const submission_id = searchParams.get("submission_id") || "";
const usePayment = useProfilingStore((s) => s.usePayment);

const submission_id = searchParams.get("submission_id") ?? "";

const navigate = useNavigate();

if (!submission_id) {
navigate("/");
}

const { postSeniorSurveyFormSubmission } = useApi();
const { postCancerSurveyFormSubmission } = useApi();

const { mutate } = useMutation({
mutationFn: postSeniorSurveyFormSubmission,
mutationKey: ["postSeniorSurveyFormSubmission", submission_id],
mutationFn: postCancerSurveyFormSubmission,
mutationKey: ["postCancerSurveyFormSubmission", submission_id],
onError: (result) => {
if (axios.isAxiosError(result)) {
if (result.response?.status !== 200) {
Expand Down Expand Up @@ -60,8 +64,8 @@ export const SurveyThankYou = () => {
consultation.
</Typography>
</AllDonePanel>
<HowEOWorks />
<FAQs />
<HowEOWorks pilot={!usePayment} />
<FAQs pilot={!usePayment} />
<FooterFull />
</LayoutDefault>
);
Expand Down
6 changes: 6 additions & 0 deletions apps/eo_web/src/screens/Cancer/SurveyForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ import {
} from "~/configs/env";
import { jotformScript } from "~/helpers/jotform_script";
import { LayoutDefault } from "~/layouts";
import { useProfilingStore } from "~/stores/useProfilingStore";


export const SurveyForm = () => {
const [searchParams] = useSearchParams();
const setUsePayment = useProfilingStore((s) => s.setUsePayment)

const isPilot = (searchParams.get("pilot") ?? "") === "true";
const email = searchParams.get("email") ?? "";
const profiled = searchParams.get("profiled") ?? "patient";
const symptoms = searchParams.get("symptoms") ?? "";

setUsePayment(!isPilot)

const formId =
profiled === "patient"
? CANCER_PATIENT_SURVEY_ID
Expand Down
6 changes: 3 additions & 3 deletions apps/eo_web/src/screens/ProfilingThankYou.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { WEB_APP_URL } from "~/configs/env";
export const ProfilingThankYou = () => {
const [searchParams] = useSearchParams();

const { account, introQuestionSubmissionId, channel } = useProfilingStore(
const { account, introQuestionSubmissionId, channel, usePayment } = useProfilingStore(
(state) => state,
);
const submissionId = searchParams.get("submission_id") || "";
Expand Down Expand Up @@ -94,8 +94,8 @@ export const ProfilingThankYou = () => {
consultation.
</Typography>
</AllDonePanel>
<HowEOWorks />
<FAQs />
<HowEOWorks pilot={channel === "cancer" && !usePayment} />
<FAQs pilot={channel === "cancer" && !usePayment} />
<FooterFull />
</LayoutDefault>
);
Expand Down

0 comments on commit 5248ed8

Please sign in to comment.