+
+
+ {/* all your listings code here */}
+
+
+
+ {/* 👇 PASTE MODAL HERE 👇 */}
+
+ {isModalOpen && (
+
+
+
+ Confirm Delete
+
+
+ Are you sure you want to delete this listing?
+
+
+
+
+
+
+
- );
- }
+ )}
+
+
+
+
{/* Page header with title and Add new listing button */}
@@ -611,11 +663,15 @@ const HostListings = () => {
{/* Delete listing button */}
+ onClick={() => {
+ setSelectedListingId(listing.id);
+ setIsModalOpen(true);
+ }}
+ className="inline-flex items-center px-3 py-1.5 border border-neutral-300 text-sm font-medium rounded-md text-red-700 bg-white hover:bg-red-50 hover:border-red-300"
+>
+ Delete
+
+
@@ -659,60 +715,22 @@ const HostListings = () => {
))
) : (
// Empty state when no listings match the current filter
-
-
- {/* Empty state title */}
-
- No listings found
-
- {/* Empty state description */}
-
- {activeTab === "all"
- ? "Get started by creating a new listing"
- : `You don't have any ${activeTab} listings`}
-
- {/* Call-to-action button to add a new listing */}
-
-
-
- Add new listing
-
-
+
+ )}
+
+
- )}
+