diff --git a/src/pages/pricing/index.tsx b/src/pages/pricing/index.tsx index 5fbe4f4..d334a8f 100644 --- a/src/pages/pricing/index.tsx +++ b/src/pages/pricing/index.tsx @@ -132,20 +132,24 @@ function ContactUsButton({ className }: { className?: string }) { ); } +type AcademicSchedule = "semester" | "quarter" | "monthly"; +type PaymentModel = "course" | "student"; + export default function Pricing() { const controls = useAnimationControls(); - const [termSystem, setTermSystem] = React.useState< - "semester" | "quarter" | "monthly" - >("semester"); - const [paymentModel, setPaymentModel] = React.useState<"course" | "student">( - "course" - ); + + const [academicSchedule, setAcademicSchedule] = + React.useState("semester"); + + const [paymentModel, setPaymentModel] = + React.useState("course"); + const [showModal, setShowModal] = React.useState(false); let basicPrice = run(() => { - if (termSystem === "semester") { + if (academicSchedule === "semester") { return 8; - } else if (termSystem === "quarter") { + } else if (academicSchedule === "quarter") { return 6; } else { return 2; @@ -164,8 +168,10 @@ export default function Pricing() { controls.start({ scale: 1.3 }).then(() => controls.start({ scale: 1 })); }; - const updateTermSystem = (termSystem: "semester" | "quarter" | "monthly") => { - setTermSystem(termSystem); + const updateAcademicSchedule = ( + academicSchedule: "semester" | "quarter" | "monthly" + ) => { + setAcademicSchedule(academicSchedule); controls.start({ scale: 1.3 }).then(() => controls.start({ scale: 1 })); }; @@ -209,11 +215,11 @@ export default function Pricing() {
- - Term system + + Academic schedule { - updateTermSystem(e.currentTarget.value as any); + updateAcademicSchedule(e.currentTarget.value as any); }} >