diff --git a/src/app/actions/invalidate-coupon.ts b/src/app/actions/invalidate-coupon.ts index 0157279..7089a59 100644 --- a/src/app/actions/invalidate-coupon.ts +++ b/src/app/actions/invalidate-coupon.ts @@ -1,14 +1,15 @@ -"use server" +"use server"; -import prisma from "@/server/db" +import prisma from "@/server/db"; -export async function invalidateCouponCode(couponCode:string){ +export async function invalidateCouponCode(couponCode: string) { + if (!couponCode) return; const resp = await prisma.referral.update({ - where:{ - code:couponCode + where: { + code: couponCode, }, - data:{ - isUsed:true - } - }) -} \ No newline at end of file + data: { + isUsed: true, + }, + }); +} diff --git a/src/components/payment.tsx b/src/components/payment.tsx index d41cccd..8794f1e 100644 --- a/src/components/payment.tsx +++ b/src/components/payment.tsx @@ -78,6 +78,12 @@ export function Payment() { alert("Payment failed"); } }, + // change to dynamic + notes: { + customerName: "John Doe", + customerEmail: "jhondoe@something.com", + customerContact: "9999999999", + }, prefill: { name: "John Doe", email: "jhondoe@something.com", diff --git a/src/components/searchable-infinite-scroll-table.tsx b/src/components/searchable-infinite-scroll-table.tsx index 05e190a..964c344 100644 --- a/src/components/searchable-infinite-scroll-table.tsx +++ b/src/components/searchable-infinite-scroll-table.tsx @@ -154,7 +154,7 @@ export function SearchableInfiniteScrollTable() { {item.usn} {item.razorpayPaymentId} {item.contactNumber} - ${item.amount.toFixed(2)} + ₹{item.amount.toFixed(2)} ))} diff --git a/src/lib/send-registration-email.ts b/src/lib/send-registration-email.ts index 4d1cc1d..ef34926 100644 --- a/src/lib/send-registration-email.ts +++ b/src/lib/send-registration-email.ts @@ -17,9 +17,8 @@ export async function sendRegistrationEmail({ await resend.emails.send({ from: '"Tedx SJEC" ', to: email, - subject: "Tedx SJEC - Email Verification", + subject: "Event Registration Successful - TEDx SJEC", react: TedxRegistrationEmail({ name, registrationLink }), - text: `Hello ${name},\n\nThank you for registering for Tedx 2024.\n\nPlease click on the link below to complete your registration.\n\n${registrationLink}\n\nThank you!\n\nTedx SJEC Team`, }); } catch (error) { console.log(error);