Fix broken Checkout.tsx - remove leftover waiting step code

This commit is contained in:
dwindown
2025-12-24 00:32:14 +07:00
parent 35a003e35c
commit 4b8765885b

View File

@@ -127,45 +127,6 @@ export default function Checkout() {
toast({ title: "Info", description: "Status pembayaran diupdate otomatis" }); toast({ title: "Info", description: "Status pembayaran diupdate otomatis" });
}; };
// Payment method selection UI - QRIS only now
if (step === "payment") {
</CardHeader>
<CardContent className="flex flex-col items-center space-y-6">
<div className="bg-white p-4 rounded-lg">
<QRCodeSVG value={paymentData.qr_string || ""} size={200} />
</div>
<div className="text-center">
<p className="text-2xl font-bold">{formatIDR(total)}</p>
{paymentData.expired_at && (
<p className="text-sm text-muted-foreground mt-2">
Berlaku hingga: {new Date(paymentData.expired_at).toLocaleString("id-ID")}
</p>
)}
</div>
<div className="w-full space-y-2">
<Button
onClick={refreshPaymentStatus}
variant="outline"
className="w-full border-2"
disabled={checkingStatus}
>
{checkingStatus ? <Loader2 className="w-4 h-4 mr-2 animate-spin" /> : null}
Cek Status Pembayaran
</Button>
<Button onClick={() => navigate("/dashboard")} variant="ghost" className="w-full">
Kembali ke Dashboard
</Button>
</div>
<p className="text-xs text-muted-foreground text-center">
Pembayaran diproses melalui Pakasir dan akan dikonfirmasi otomatis setelah berhasil.
</p>
</CardContent>
</Card>
</div>
</AppLayout>
);
}
return ( return (
<AppLayout> <AppLayout>
<div className="container mx-auto px-4 py-8"> <div className="container mx-auto px-4 py-8">