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() {
{error}
} + {error && ( +{error}
+ )}