page.tsx53 lines, 1.6 KB
| 1 | "use client"; |
| 2 | |
| 3 | import React, { useEffect } from "react"; |
| 4 | import { useRouter } from "next/navigation"; |
| 5 | import { |
| 6 | Card, |
| 7 | CardContent, |
| 8 | CardDescription, |
| 9 | CardFooter, |
| 10 | CardHeader, |
| 11 | CardTitle, |
| 12 | } from "@/components/ui/card"; |
| 13 | import { Button } from "@/components/ui/button"; |
| 14 | import { XCircle } from "lucide-react"; |
| 15 | import { toast } from "sonner"; |
| 16 | |
| 17 | export default function SubscriptionCancelPage() { |
| 18 | const router = useRouter(); |
| 19 | |
| 20 | useEffect(() => { |
| 21 | toast.error("Subscription process was cancelled."); |
| 22 | }, []); |
| 23 | |
| 24 | return ( |
| 25 | <div className="container mx-auto px-4 py-16 flex justify-center"> |
| 26 | <Card className="max-w-md w-full"> |
| 27 | <CardHeader className="text-center"> |
| 28 | <div className="flex justify-center mb-4"> |
| 29 | <XCircle className="h-16 w-16 text-red-500" /> |
| 30 | </div> |
| 31 | <CardTitle className="text-2xl">Subscription Cancelled</CardTitle> |
| 32 | <CardDescription> |
| 33 | You've cancelled the subscription process. |
| 34 | </CardDescription> |
| 35 | </CardHeader> |
| 36 | <CardContent className="text-center"> |
| 37 | <p> |
| 38 | Your subscription was not processed. You can try again or explore |
| 39 | other subscription options. |
| 40 | </p> |
| 41 | </CardContent> |
| 42 | <CardFooter className="flex justify-center gap-4"> |
| 43 | <Button onClick={() => router.push("/subscriptions")}> |
| 44 | View Plans |
| 45 | </Button> |
| 46 | <Button variant="outline" onClick={() => router.push("/dashboard")}> |
| 47 | Go to Dashboard |
| 48 | </Button> |
| 49 | </CardFooter> |
| 50 | </Card> |
| 51 | </div> |
| 52 | ); |
| 53 | } |