diff --git a/src/app/invest/page.tsx b/src/app/invest/page.tsx index 97ca4b3..e7b47ff 100644 --- a/src/app/invest/page.tsx +++ b/src/app/invest/page.tsx @@ -3,7 +3,14 @@ import { Separator } from "@/components/ui/separator"; import { Input } from "@/components/ui/input"; import { CardsPaymentMethod } from "@/components/paymentMethod"; -import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/components/ui/table"; import { Button } from "@/components/ui/button"; import { useState } from "react"; import { @@ -47,7 +54,9 @@ const term_data = [ ]; export default function Invest() { - const [checkedTerms, setCheckedTerms] = useState(Array(term_data.length).fill(false)); + const [checkedTerms, setCheckedTerms] = useState( + Array(term_data.length).fill(false) + ); const [error, setError] = useState(""); const router = useRouter(); // Initialize the router @@ -59,7 +68,9 @@ export default function Invest() { const handleTermServiceClick = () => { if (checkedTerms.some((checked) => !checked)) { - setError("Please accept all terms before proceeding with the investment."); + setError( + "Please accept all terms before proceeding with the investment." + ); } else { setError(""); handleInvestmentSuccess(); @@ -88,7 +99,7 @@ export default function Invest() {

Payment Information

- +
@@ -106,7 +117,11 @@ export default function Invest() { {term_data.map((item, index) => ( - handleCheckboxChange(index)} /> + handleCheckboxChange(index)} + /> {item.term} {item.description} @@ -123,7 +138,9 @@ export default function Invest() { Are you absolutely sure? - This action cannot be undone. This will permanently! + + This action cannot be undone. This will permanently! + - {error &&

{error}

} + {error && ( +

{error}

+ )}
); -} \ No newline at end of file +} diff --git a/src/components/paymentMethod.tsx b/src/components/paymentMethod.tsx index 634b5b6..859de89 100644 --- a/src/components/paymentMethod.tsx +++ b/src/components/paymentMethod.tsx @@ -23,7 +23,7 @@ import { export function CardsPaymentMethod() { return ( - + Payment Method