diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index 7fc9757..3359f3a 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -44,7 +44,7 @@ const page = async () => { } - return ; + return ; }; export default page; diff --git a/components/forms/travel-form.tsx b/components/forms/travel-form.tsx index 972053d..dba4652 100644 --- a/components/forms/travel-form.tsx +++ b/components/forms/travel-form.tsx @@ -372,6 +372,8 @@ export default function TravelItineraryForm({ )} + + ); } diff --git a/components/itinerary-page.tsx b/components/itinerary-page.tsx index 40493de..f8586a8 100644 --- a/components/itinerary-page.tsx +++ b/components/itinerary-page.tsx @@ -2,8 +2,10 @@ import { useState } from "react"; import TravelItineraryForm from "./forms/travel-form"; +import { RequestCredits } from "./request-credits"; const ItineraryHome = ({ initialCredits }: { initialCredits: number }) => { const [credits, setCredits] = useState(initialCredits); + return ( diff --git a/components/pages/dashboard.tsx b/components/pages/dashboard.tsx index 5a22a1f..6b95d6f 100644 --- a/components/pages/dashboard.tsx +++ b/components/pages/dashboard.tsx @@ -6,12 +6,14 @@ import { ScrollArea } from "@/components/ui/scroll-area"; import { PlusIcon, MessageSquare, Delete, DeleteIcon } from "lucide-react"; import ItineraryDisplay from "../travel-itinerary"; import Link from "next/link"; -import { clsx } from 'clsx'; +import { RequestCredits } from "../request-credits"; export default function Dashboard({ + email, data, credits, }: { + email: string; data: { id: number; name: string; @@ -119,6 +121,9 @@ export default function Dashboard({ } })} + {credits <= 0 && ( + + )} ); diff --git a/components/request-credits.tsx b/components/request-credits.tsx new file mode 100644 index 0000000..878ecd9 --- /dev/null +++ b/components/request-credits.tsx @@ -0,0 +1,38 @@ +import { Card, CardTitle, CardContent, CardDescription, CardFooter } from "./ui/card" +import { Button } from "./ui/button" +import Link from "next/link" +import Image from "next/image" +import { Mail } from "lucide-react" + +export const RequestCredits = (email:{ + email: string +}) => { + return ( +
+ + +
+ Out of credits +
+

Out of Credits

+

+ You've used all your credits. To continue planning your adventures, please request more credits. +

+
+ + + + + +
+
+ ) +} \ No newline at end of file