diff --git a/wonderlust/src/app/dashboard/page.js b/wonderlust/src/app/dashboard/page.js index 540b79f..72f6b44 100644 --- a/wonderlust/src/app/dashboard/page.js +++ b/wonderlust/src/app/dashboard/page.js @@ -1,44 +1,10 @@ "use client"; import { useState, useEffect } from "react"; -import { useRouter } from "next/navigation"; -import { FaEdit, FaTrash } from "react-icons/fa"; import TripForm from "@/src/components/TripForm"; -import DeleteConfirm from "@/src/components/DeleteConfirm"; - +import TripCard from "../../components/TripCard"; export default function Dashboard() { - const [trips, setTrips] = useState([ - { - tripname: "Beach Getaway", - destination: "Delhi", - budget: "2000", - travellers: "3", - startDay: "2025-07-01T00:00:00.000Z", - endDay: "2025-07-10T00:00:00.000Z", - user: "6792633eaa08eb6efef02261", - tripObjId: "679e6e05189dd60ff447e7fd", - }, - { - tripname: "Sample Card 2", - destination: "Delhi", - budget: "2000", - travellers: "3", - startDay: "2025-07-01T00:00:00.000Z", - endDay: "2025-07-10T00:00:00.000Z", - user: "6792633eaa08eb6efef02261", - tripObjId: "679e6e05189dd60ff447e7ff", - }, - { - tripname: "Sample Card 3", - destination: "Delhi", - budget: "2000", - travellers: "3", - startDay: "2025-07-01T00:00:00.000Z", - endDay: "2025-07-10T00:00:00.000Z", - user: "6792633eaa08eb6efef02261", - tripObjId: "679e6ec4189dd60ff447e804", - }, - ]); + const [trips, setTrips] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(""); @@ -79,53 +45,7 @@ export default function Dashboard() {
{trips.map((trip, index) => ( -
-
-

{trip.tripname}

-
-
- } - title="Edit Trip" - actionTitle="Save Trip" - action="edit" - id={trip.tripObjId} - tripInfo={trip} - /> -
- -
- } - id={trip.tripObjId} - /> -
-
-
- -
-

{trip.startDay}

-

Budget: {trip.budget}

-

Travelers: {trip.travellers}

-
- -
- - Planning - - - - View Details - -
-
+ ))}