diff --git a/src/app/api/(verification)/verify-mail/route.ts b/src/app/api/(verification)/verify-mail/route.ts index eb56fda..068cb8c 100644 --- a/src/app/api/(verification)/verify-mail/route.ts +++ b/src/app/api/(verification)/verify-mail/route.ts @@ -3,64 +3,64 @@ import getErrorMessage from "@/utils/getErrorMessage"; import { NextRequest, NextResponse } from "next/server"; export async function POST(req: NextRequest) { - const body = await req.json(); - console.log(body); - const { identifier, otp } = body; - if (!identifier || !otp) { - return NextResponse.json( - { message: "Identifier and OTP are required", status: 400 }, - { status: 400 }, - ); - } - try { - await prisma.$transaction(async (tx) => { - // const request = await tx.verificationRequest.findFirst({ - // where: { - // identifier, - // otp, - // expires: { - // gte: new Date(), - // }, - // }, - // orderBy: { - // created_at: "desc", - // }, - // }); - // if (!request) { - // throw new Error("Verification failed: Invalid or expired OTP"); - // } - // await tx.form.updateMany({ - // where: { - // email: identifier, - // }, - // data: { - // emailVerified: true, - // }, - // }); - // await tx.verificationRequest.deleteMany({ - // where: { - // identifier, - // }, - // }); - }); + const body = await req.json(); + console.log(body); + const { identifier, otp } = body; + if (!identifier || !otp) { + return NextResponse.json( + { message: "Identifier and OTP are required", status: 400 }, + { status: 400 } + ); + } + // try { + // await prisma.$transaction(async (tx) => { + // const request = await tx.verificationRequest.findFirst({ + // where: { + // identifier, + // otp, + // expires: { + // gte: new Date(), + // }, + // }, + // orderBy: { + // created_at: "desc", + // }, + // }); + // if (!request) { + // throw new Error("Verification failed: Invalid or expired OTP"); + // } + // await tx.form.updateMany({ + // where: { + // email: identifier, + // }, + // data: { + // emailVerified: true, + // }, + // }); + // await tx.verificationRequest.deleteMany({ + // where: { + // identifier, + // }, + // }); + // }); return NextResponse.json( - { - message: "OTP verified successfully back!", - status: 200, - }, - { status: 200 }, - ); - } catch (error: unknown) { - const errorMessage = getErrorMessage(error); - console.error("OTP verification failed:", errorMessage); - return NextResponse.json( - { message: errorMessage, status: 400 }, - { status: 400 }, + { + message: "OTP verified successfully back!", + status: 200, + }, + { status: 200 } ); - } + // catch (error: unknown) { + // const errorMessage = getErrorMessage(error); + // console.error("OTP verification failed:", errorMessage); + // return NextResponse.json( + // { message: errorMessage, status: 400 }, + // { status: 400 }, + // ); + // } } export async function GET() { - return NextResponse.json({ message: "Hello from the Send mail!" }); + return NextResponse.json({ message: "Hello from the Send mail!" }); } diff --git a/src/app/page.tsx b/src/app/page.tsx index 00a6a5b..90c8fe9 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -6,6 +6,7 @@ import StackedCards from "@/components/stacking-cards/stacked"; import { PreviousEdition } from "@/components/common/Container-Scroll"; import About from "@/components/common/About"; import Team from "@/components/common/Team-Section"; +import { CtaSection } from "@/components/common/cta-section"; import Performers from "@/components/widget/performers"; export default function Home() { @@ -35,6 +36,7 @@ export default function Home() { The Team + diff --git a/src/components/common/cta-section.tsx b/src/components/common/cta-section.tsx new file mode 100644 index 0000000..6640360 --- /dev/null +++ b/src/components/common/cta-section.tsx @@ -0,0 +1,29 @@ +"use client"; + +import { Button } from "@/components/ui/button"; + +export function CtaSection() { + return ( +
+
+
+

+ Live What's Worth Living +

+

+ Celebrate the joy of accomplishment with an app designed to track your progress and + motivate your efforts. +

+ +
+
+ ); +} diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 225e113..65d4fcd 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -1,11 +1,11 @@ -import * as React from "react"; -import { Slot } from "@radix-ui/react-slot"; -import { cva, type VariantProps } from "class-variance-authority"; +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" -import { cn } from "@/lib/utils"; +import { cn } from "@/lib/utils" const buttonVariants = cva( - "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", + "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", { variants: { variant: { @@ -31,27 +31,27 @@ const buttonVariants = cva( variant: "default", size: "default", }, - }, -); + } +) export interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps { - asChild?: boolean; + asChild?: boolean } const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button"; + const Comp = asChild ? Slot : "button" return ( - ); - }, -); -Button.displayName = "Button"; + ) + } +) +Button.displayName = "Button" -export { Button, buttonVariants }; +export { Button, buttonVariants }