Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the prices and added the new speakers #79

Merged
merged 4 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/components/common/registration-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ export default function RegistrationForm() {

const verifyCoupon = async () => {
const couponCode = form.getValues("couponCode");
if (!couponCode) {
return;
}
if (couponCode.length !== 10) {
toast.error("Invalid Coupon Code");
return;
}
try {
const result = await getPrice(couponCode);
if (!result.success) {
Expand Down Expand Up @@ -522,7 +529,7 @@ export default function RegistrationForm() {
<div className="space-y-4">
<div>
<Label>Total Amount</Label>
<p className="text-2xl font-bold">₹{pricing.finalPrice}</p>
<p className="text-2xl font-bold">₹{Math.round(pricing.finalPrice+ 0.02*pricing.finalPrice)}</p>
</div>
<FormField
control={form.control}
Expand All @@ -535,7 +542,7 @@ export default function RegistrationForm() {
<Input
placeholder="Enter coupon code"
{...field}
disabled={memberType !== "external"}
disabled={memberType !== "external" || isProcessing}
/>
</FormControl>
<Button
Expand Down
5 changes: 4 additions & 1 deletion src/components/common/speakers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import gsap from "gsap";
import ScrollTrigger from "gsap/ScrollTrigger";
import { useGSAP } from "@gsap/react";
import { speakers } from "@/constants";
import Image from "next/image";

export default function Component() {
useGSAP(() => {
Expand Down Expand Up @@ -40,10 +41,12 @@ export default function Component() {
} items-stretch justify-between bg-black/40 rounded-2xl overflow-hidden shadow-xl border border-white border-opacity-20`}
>
<div className="w-full md:w-1/2 h-auto md:h-auto">
<img
<Image
className="w-full h-full object-cover"
src={speaker.img}
alt={speaker.name}
width={1920}
height={1080}
/>
</div>

Expand Down
13 changes: 10 additions & 3 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { tedxsjecAssetsPrefix } from "@/lib/utils";
import { Speaker } from "@/types";

export const basePrice = 1000;
export const basePrice = 980.39;
export const initialdiscount = 0;
export const sjecStudentPrice = 750;
export const sjecFacultyPrice = 800;
export const sjecStudentPrice = 735.29;
export const sjecFacultyPrice = 784.31;
export const speakers: Speaker[] = [
{
id: 1,
Expand Down Expand Up @@ -63,4 +63,11 @@ export const speakers: Speaker[] = [
"Anish Shetty is a motorsport icon with over 206 podiums and 6 championships to his name, blazing trails on national and international platforms. As the first Asian to secure a podium in the eSC World Championship, he has consistently showcased excellence in racing. A multiple-time Indian National Motorcycle Racing and Rallying Champion, and the Royal Enfield Continental GT Cup Champion, Anish combines skill with endurance, earning the title of Fittest Man in Asia-2021 in the EF category. Founder of PRN Motorsport and a dedicated coach, he has trained over 1200+ participants, inspiring future racers through passion and perseverance.",
img: `${tedxsjecAssetsPrefix}/speakers/cropped-Anish1.avif`,
},
{
id: 8,
name: " Dr Lavina Marilla Noronha",
profession: "Director of Ave Maria Palliative Care",
description:"Dr. Lavina Noronha, Director of Ave Maria Palliative Care, exemplifies humility and dedication. With an MPhil from NIMHANS and a Doctorate from the University of Illinois, she has served as an associate professor and director at Our Lady of the Lake University, USA, with extensive clinical experience in mental health, hospice, and crisis care. Her life changed when she returned to India realizing the lack of support for terminally ill patients. She founded Ave Maria Palliative Care, providing free, compassionate care to patients, regardless of their background, with a dedicated team and community support.",
img: `${tedxsjecAssetsPrefix}/speakers/dr-lavina-1.avif`,
},
];
Loading