diff --git a/.github/workflows/container-image.yml b/.github/workflows/container-image.yml index dcef766..19f0ddd 100644 --- a/.github/workflows/container-image.yml +++ b/.github/workflows/container-image.yml @@ -64,10 +64,3 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - secret-envs: | - AUTH_SECRET: "test_auth" - AUTH_GOOGLE_ID: "test_gid" - AUTH_GOOGLE_SECRET: "test_gsecret" - DATABASE_URL: "test_db_url" - RAZORPAY_KEY: "test_key" - RAZORPAY_SECRET: "test_secret" diff --git a/Dockerfile b/Dockerfile index 5ad17ad..20433c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,8 @@ RUN npm ci # Copy the rest of the app's source code to the working directory COPY . . -ARG AUTH_SECRET +# Dummy values are set to prevent build errors +ARG AUTH_SECRET="dummy_secret" ENV AUTH_SECRET=$AUTH_SECRET ARG AUTH_GOOGLE_ID ENV AUTH_GOOGLE_ID=$AUTH_GOOGLE_ID @@ -21,9 +22,9 @@ ARG AUTH_GOOGLE_SECRET ENV AUTH_GOOGLE_SECRET=$AUTH_GOOGLE_SECRET ARG DATABASE_URL ENV DATABASE_URL=$DATABASE_URL -ARG RAZORPAY_KEY +ARG RAZORPAY_KEY="dummy_key" ENV RAZORPAY_KEY=$RAZORPAY_KEY -ARG RAZORPAY_SECRET +ARG RAZORPAY_SECRET="dummy_secret" ENV RAZORPAY_SECRET=$RAZORPAY_SECRET ENV AUTH_TRUST_HOST="true" ARG AUTH_URL diff --git a/src/app/(content)/team/page.tsx b/src/app/(content)/team/page.tsx index 64dc4a0..5f39d42 100644 --- a/src/app/(content)/team/page.tsx +++ b/src/app/(content)/team/page.tsx @@ -10,7 +10,6 @@ const coreTeam = [ `${tiaraAssetsPrefix}/coreteam/convener_1.avif`, `${tiaraAssetsPrefix}/coreteam/convener_2.avif`, `${tiaraAssetsPrefix}/coreteam/cultural.avif`, - `${tiaraAssetsPrefix}/coreteam/design.avif`, `${tiaraAssetsPrefix}/coreteam/discipline.avif`, `${tiaraAssetsPrefix}/coreteam/logistics.avif`, `${tiaraAssetsPrefix}/coreteam/media.avif`, @@ -20,9 +19,23 @@ const coreTeam = [ `${tiaraAssetsPrefix}/coreteam/prizes_awards.avif`, `${tiaraAssetsPrefix}/coreteam/social_media.avif`, `${tiaraAssetsPrefix}/coreteam/sponsership.avif`, - `${tiaraAssetsPrefix}/coreteam/stage_decoration.avif`, `${tiaraAssetsPrefix}/coreteam/technical.avif`, `${tiaraAssetsPrefix}/coreteam/website.avif`, + `${tiaraAssetsPrefix}/coreteam/stage_decoration.avif`, + `${tiaraAssetsPrefix}/coreteam/design.avif`, +]; + +const webTeam = [ + `${tiaraAssetsPrefix}/webteam/anish.avif`, + `${tiaraAssetsPrefix}/webteam/rabil.avif`, + `${tiaraAssetsPrefix}/webteam/jenison.avif`, + `${tiaraAssetsPrefix}/webteam/joywin.avif`, + `${tiaraAssetsPrefix}/webteam/vyshnav.avif`, + `${tiaraAssetsPrefix}/webteam/vineeth_.avif`, + `${tiaraAssetsPrefix}/webteam/melroy.avif`, + `${tiaraAssetsPrefix}/webteam/nithin.avif`, + `${tiaraAssetsPrefix}/webteam/uthpal.avif`, + `${tiaraAssetsPrefix}/webteam/vaibhav.avif`, ]; export default function CoreTeamPage() { @@ -66,6 +79,44 @@ export default function CoreTeamPage() { })} +
+
+

+ Website Team +

+
+
+
+
+ {webTeam.map((card, index) => { + return ( + + + + thumbnail + + + + ); + })} +
+
); } diff --git a/src/data/categoryList.ts b/src/data/categoryList.ts index 434678d..a0e8e93 100644 --- a/src/data/categoryList.ts +++ b/src/data/categoryList.ts @@ -1068,7 +1068,7 @@ const categoriesList = { // description: "", // rules: ["RR"], // prerequisites: ["PP"], - // costs: 250, + // costs: 1, // thumbnail: "", // startTime: "2024-05-12 10:00", // endTime: "2024-05-12 18:00", diff --git a/src/helper/zodSchema.ts b/src/helper/zodSchema.ts deleted file mode 100644 index 139597f..0000000 --- a/src/helper/zodSchema.ts +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 3092652..6755dab 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -36,6 +36,71 @@ export interface makePaymentProps { }; } +interface RazorpaySuccesshandlerArgs { + razorpay_signature: string; + razorpay_order_id: string; + razorpay_payment_id: string; +} + +export interface RazorpayOptions { + key: string; + amount: number; + currency: string; + name: string; + description?: string; + image?: string; + order_id: string; + handler?: (args: RazorpaySuccesshandlerArgs) => void; + prefill?: { + name?: string; + email?: string; + contact?: string; + method?: "card" | "netbanking" | "wallet" | "emi" | "upi"; + }; + notes?: {}; + theme?: { + hide_topbar?: boolean; + color?: string; + backdrop_color?: string; + }; + modal?: { + backdropclose?: boolean; + escape?: boolean; + handleback?: boolean; + confirm_close?: boolean; + ondismiss?: () => void; + animation?: boolean; + }; + subscription_id?: string; + subscription_card_change?: boolean; + recurring?: boolean; + callback_url?: string; + redirect?: boolean; + customer_id?: string; + timeout?: number; + remember_customer?: boolean; + readonly?: { + contact?: boolean; + email?: boolean; + name?: boolean; + }; + hidden?: { + contact?: boolean; + email?: boolean; + }; + send_sms_hash?: boolean; + allow_rotation?: boolean; + retry?: { + enabled?: boolean; + max_count?: boolean; + }; + config?: { + display: { + language: "en" | "ben" | "hi" | "mar" | "guj" | "tam" | "tel"; + }; + }; +} + export const makePayment = async ({ productId = null, productName, @@ -49,11 +114,11 @@ export const makePayment = async ({ headers: { "Content-Type": "application/json", // Assuming the API expects JSON }, - body: JSON.stringify({ amount, prefillData }), + body: JSON.stringify({ amount, prefillData }), }); const { orderId } = await response.json(); - const options = { - key: key, + const options: RazorpayOptions = { + key: key!, name: productName, image: `${tiaraAssetsPrefix}/t24.png`, currency: "INR", @@ -65,7 +130,14 @@ export const makePayment = async ({ email: prefillData.email, contact: prefillData.contact, }, - handler: async function (response: any) { + notes: { + customerName: prefillData.name, + customerEmail: prefillData.email, + customerContact: prefillData.contact, + college: prefillData.college, + events: prefillData.events.join(", "), + }, + handler: async function (response) { const data = { orderCreationId: orderId, razorpayPaymentId: response.razorpay_payment_id, @@ -74,7 +146,7 @@ export const makePayment = async ({ college: prefillData.college, events: prefillData.events, teams: prefillData.teams, - phone:prefillData.contact, + phone: prefillData.contact, }; const result = await fetch("/api/razorpay/verify", { @@ -85,13 +157,13 @@ export const makePayment = async ({ const res = await result.json(); if (res.isOk) { toast({ - title: "Payment successful", + title: "✅ Payment successful", description: "Your payment was successful", }); window.location.href = "/"; } else { toast({ - title: "Payment failed", + title: "❌ Payment failed", description: "Please try again. Contact support for help. " + res.error, variant: "destructive",