From ce68ab6b2053f6a8eaeaf39832d67f933ea05380 Mon Sep 17 00:00:00 2001 From: sirin Date: Mon, 28 Oct 2024 21:06:12 +0700 Subject: [PATCH] refactor: remove unused import --- src/app/(investment)/invest/[id]/checkoutPage.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/app/(investment)/invest/[id]/checkoutPage.tsx b/src/app/(investment)/invest/[id]/checkoutPage.tsx index 0563e6a..d930ca7 100644 --- a/src/app/(investment)/invest/[id]/checkoutPage.tsx +++ b/src/app/(investment)/invest/[id]/checkoutPage.tsx @@ -14,7 +14,6 @@ import { DialogClose, } from "@/components/ui/dialog"; import { Button } from "@/components/ui/button"; -import useSession from "@/lib/supabase/useSession"; import { createSupabaseClient } from "@/lib/supabase/clientComponentClient"; import { useRouter } from "next/navigation"; @@ -38,9 +37,6 @@ const CheckoutPage = ({ const isAcceptTerm = isAcceptTermAndService(); const router = useRouter(); - const { session } = useSession(); - const user = session?.user; - useEffect(() => { fetch("/api/create-payment-intent", { method: "POST", @@ -108,7 +104,8 @@ const CheckoutPage = ({
+ role="status" + > Loading... @@ -130,7 +127,8 @@ const CheckoutPage = ({ type="button" onClick={() => setIsDialogOpen(true)} disabled={!stripe || loading} - className="text-white w-full p-5 bg-black mt-2 rounded-md font-bold disabled:opacity-50 disabled:animate-pulse"> + className="text-white w-full p-5 bg-black mt-2 rounded-md font-bold disabled:opacity-50 disabled:animate-pulse" + > {!loading ? `Pay $${amount}` : "Processing..."}