|
| 1 | +import { getCurrentSession } from "@/server/auth"; |
| 2 | +import { DollarSign, FileText, Home, Lock, Wallet, Zap } from "lucide-react"; |
1 | 3 | import Link from "next/link";
|
2 | 4 |
|
3 |
| -export default function NotFound() { |
| 5 | +export default async function NotFound() { |
| 6 | + const { user } = await getCurrentSession(); |
| 7 | + |
4 | 8 | return (
|
5 |
| - <div className="min-h-screen flex items-center justify-center bg-gray-50"> |
6 |
| - <div className="max-w-md w-full text-center"> |
| 9 | + <div className="min-h-screen flex flex-col items-center justify-center bg-gray-50 px-6"> |
| 10 | + <div className="max-w-2xl w-full text-center"> |
7 | 11 | <div className="mb-8">
|
8 |
| - <h1 className="text-6xl font-bold text-gray-900 mb-4">404</h1> |
9 |
| - <h2 className="text-2xl font-semibold text-gray-700 mb-2"> |
10 |
| - Not Found |
11 |
| - </h2> |
| 12 | + <div className="w-16 h-16 rounded-xl bg-black flex items-center justify-center mx-auto mb-6"> |
| 13 | + <span className="text-white font-bold text-xl">EI</span> |
| 14 | + </div> |
| 15 | + </div> |
| 16 | + |
| 17 | + <div className="mb-8"> |
| 18 | + <h1 className="text-8xl font-bold text-gray-900 mb-4">404</h1> |
| 19 | + <div className="flex items-center justify-center gap-2 mb-4"> |
| 20 | + <Wallet className="w-5 h-5 text-gray-600" /> |
| 21 | + <span className="text-lg font-medium text-gray-700"> |
| 22 | + Page Not Found |
| 23 | + </span> |
| 24 | + </div> |
| 25 | + <p className="text-gray-600 mb-2"> |
| 26 | + The page you're looking for doesn't exist or may have been moved. |
| 27 | + </p> |
12 | 28 | <p className="text-gray-600">
|
13 |
| - Sorry, we couldn't find the page you're looking for. |
| 29 | + Your account and invoices remain secure. |
14 | 30 | </p>
|
15 | 31 | </div>
|
16 | 32 |
|
| 33 | + <div className="grid grid-cols-1 md:grid-cols-3 gap-4 mb-8"> |
| 34 | + <Link |
| 35 | + href="/payouts" |
| 36 | + className="shadow-md group p-6 bg-white rounded-lg border border-gray-200 hover:border-gray-300 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2" |
| 37 | + > |
| 38 | + <div className="w-12 h-12 rounded-lg bg-blue-100 flex items-center justify-center mx-auto mb-4 group-hover:bg-blue-200 transition-colors"> |
| 39 | + <DollarSign className="w-6 h-6 text-blue-600" /> |
| 40 | + </div> |
| 41 | + <h3 className="font-semibold text-gray-900 mb-2">Payouts</h3> |
| 42 | + <p className="text-sm text-gray-600"> |
| 43 | + Single, batch or recurring payouts |
| 44 | + </p> |
| 45 | + </Link> |
| 46 | + |
| 47 | + {user ? ( |
| 48 | + <Link |
| 49 | + href="/invoices/create" |
| 50 | + className="shadow-md group p-6 bg-white rounded-lg border border-gray-200 hover:border-gray-300 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2" |
| 51 | + > |
| 52 | + <div className="w-12 h-12 rounded-lg bg-purple-100 flex items-center justify-center mx-auto mb-4 group-hover:bg-purple-200 transition-colors"> |
| 53 | + <Zap className="w-6 h-6 text-purple-600" /> |
| 54 | + </div> |
| 55 | + <h3 className="font-semibold text-gray-900 mb-2"> |
| 56 | + Create Invoice |
| 57 | + </h3> |
| 58 | + <p className="text-sm text-gray-600"> |
| 59 | + Start a new payment request |
| 60 | + </p> |
| 61 | + </Link> |
| 62 | + ) : ( |
| 63 | + <div className="shadow-md p-6 bg-white rounded-lg border border-gray-200 opacity-75 cursor-not-allowed"> |
| 64 | + <div className="w-12 h-12 rounded-lg bg-gray-100 flex items-center justify-center mx-auto mb-4"> |
| 65 | + <Lock className="w-6 h-6 text-gray-500" /> |
| 66 | + </div> |
| 67 | + <h3 className="font-semibold text-gray-900 mb-2"> |
| 68 | + Sign in to create invoices |
| 69 | + </h3> |
| 70 | + <p className="text-sm text-gray-600"> |
| 71 | + Start a new payment request |
| 72 | + </p> |
| 73 | + </div> |
| 74 | + )} |
| 75 | + |
| 76 | + {user ? ( |
| 77 | + <Link |
| 78 | + href="/subscription-plans" |
| 79 | + className="shadow-md group p-6 bg-white rounded-lg border border-gray-200 hover:border-gray-300 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2" |
| 80 | + > |
| 81 | + <div className="w-12 h-12 rounded-lg bg-green-100 flex items-center justify-center mx-auto mb-4 group-hover:bg-green-200 transition-colors"> |
| 82 | + <FileText className="w-6 h-6 text-green-600" /> |
| 83 | + </div> |
| 84 | + <h3 className="font-semibold text-gray-900 mb-2"> |
| 85 | + Subscription Plans |
| 86 | + </h3> |
| 87 | + <p className="text-sm text-gray-600"> |
| 88 | + Manage your subscription plans |
| 89 | + </p> |
| 90 | + </Link> |
| 91 | + ) : ( |
| 92 | + <div className="shadow-md p-6 bg-white rounded-lg border border-gray-200 opacity-75 cursor-not-allowed"> |
| 93 | + <div className="w-12 h-12 rounded-lg bg-gray-100 flex items-center justify-center mx-auto mb-4"> |
| 94 | + <Lock className="w-6 h-6 text-gray-500" /> |
| 95 | + </div> |
| 96 | + <h3 className="font-semibold text-gray-900 mb-2"> |
| 97 | + Sign in to manage subscription plans |
| 98 | + </h3> |
| 99 | + <p className="text-sm text-gray-600"> |
| 100 | + View and manage your subscription options |
| 101 | + </p> |
| 102 | + </div> |
| 103 | + )} |
| 104 | + </div> |
| 105 | + |
17 | 106 | <Link
|
18 |
| - href="/" |
19 |
| - className="inline-flex items-center px-6 py-3 bg-primary text-white font-medium rounded-lg hover:bg-blue-700 transition-colors duration-200" |
| 107 | + href="/dashboard" |
| 108 | + className="inline-flex items-center gap-2 px-6 py-3 bg-black text-white font-medium rounded-lg hover:bg-gray-800 transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2" |
20 | 109 | >
|
21 |
| - Go Home |
| 110 | + <Home className="w-4 h-4" /> |
| 111 | + Back to Dashboard |
22 | 112 | </Link>
|
23 | 113 | </div>
|
24 | 114 | </div>
|
|
0 commit comments