page.tsx68 lines, 2.1 KB
| 1 | "use client"; |
| 2 | |
| 3 | import { useState } from "react"; |
| 4 | import { |
| 5 | Card, |
| 6 | CardContent, |
| 7 | CardDescription, |
| 8 | CardFooter, |
| 9 | CardHeader, |
| 10 | CardTitle, |
| 11 | } from "@/components/ui/card"; |
| 12 | import { Button } from "@/components/ui/button"; |
| 13 | import Link from "next/link"; |
| 14 | import { UploadModal } from "@/components/modals/upload-modal"; |
| 15 | |
| 16 | export default function PaymentSuccess() { |
| 17 | const [isUploadModalOpen, setIsUploadModalOpen] = useState(false); |
| 18 | |
| 19 | return ( |
| 20 | <> |
| 21 | <div className="min-h-screen flex items-center justify-center p-4"> |
| 22 | <Card className="w-full max-w-md"> |
| 23 | <CardHeader> |
| 24 | <CardTitle className="flex items-center gap-2 text-primary"> |
| 25 | Payment was Cancelled |
| 26 | </CardTitle> |
| 27 | <CardDescription> |
| 28 | Something went wrong with your payment. |
| 29 | </CardDescription> |
| 30 | </CardHeader> |
| 31 | <CardContent> |
| 32 | <div className="space-y-4"> |
| 33 | <p>To recieive your analysis, you need to upload an PDF.</p> |
| 34 | <div className="bg-blue-50 border-l-4 border-blue-500 p-4"> |
| 35 | <div className="flex items-center"> |
| 36 | <p className="text-sm text-blue-700 text-left"> |
| 37 | <strong>Note:</strong> |
| 38 | <br /> |
| 39 | Your payment was cancelled. please contact our support team |
| 40 | if u need any help |
| 41 | </p> |
| 42 | </div> |
| 43 | </div> |
| 44 | </div> |
| 45 | </CardContent> |
| 46 | <CardFooter> |
| 47 | <div className="flex flex-col w-full space-y-2"> |
| 48 | <Button |
| 49 | onClick={() => setIsUploadModalOpen(true)} |
| 50 | className="w-full" |
| 51 | > |
| 52 | Upload for Full Analysis |
| 53 | </Button> |
| 54 | <Button className="w-full" asChild variant="outline"> |
| 55 | <Link href="/dashboard">Go to Dashboard</Link> |
| 56 | </Button> |
| 57 | </div> |
| 58 | </CardFooter> |
| 59 | </Card> |
| 60 | </div> |
| 61 | <UploadModal |
| 62 | isOpen={isUploadModalOpen} |
| 63 | onClose={() => setIsUploadModalOpen(false)} |
| 64 | onUploadComplete={() => setIsUploadModalOpen(true)} |
| 65 | /> |
| 66 | </> |
| 67 | ); |
| 68 | } |