diff --git a/components/display-products.tsx b/components/display-products.tsx index 57d1d2f..5cda473 100644 --- a/components/display-products.tsx +++ b/components/display-products.tsx @@ -261,7 +261,7 @@ const DisplayProducts = ({ productEventContext.isLoading || isProductsLoading || isLoadingMore ? ( -
+
) : canShowLoadMore && productEvents.length != 0 ? ( diff --git a/components/home/home-feed.tsx b/components/home/home-feed.tsx index 0ec65bb..c04d538 100644 --- a/components/home/home-feed.tsx +++ b/components/home/home-feed.tsx @@ -1,12 +1,8 @@ "use client"; -import React, { useEffect, useState } from "react"; +import React from "react"; import MarketplacePage from "./marketplace"; -import ProductForm from "../product-form"; -import { useRouter } from "next/router"; -import { useSearchParams } from "next/navigation"; -import { isUserLoggedIn } from "../utility/nostr-helper-functions"; const HomeFeed = ({ focusedPubkey, @@ -15,21 +11,6 @@ const HomeFeed = ({ focusedPubkey: string; setFocusedPubkey: (value: string) => void; }) => { - const router = useRouter(); - const searchParams = useSearchParams(); - - const [showModal, setShowModal] = useState(false); - - useEffect(() => { - if (!searchParams || !isUserLoggedIn()) return; - setShowModal(searchParams.has("addNewListing")); - }, [searchParams]); - - const handleProductModalToggle = () => { - setShowModal(!showModal); - router.push("/"); - }; - return (
@@ -38,11 +19,6 @@ const HomeFeed = ({ setFocusedPubkey={setFocusedPubkey} />
- -
); }; diff --git a/components/my-listings/my-listings-feed.tsx b/components/my-listings/my-listings-feed.tsx index b7dda50..c3ed4c2 100644 --- a/components/my-listings/my-listings-feed.tsx +++ b/components/my-listings/my-listings-feed.tsx @@ -20,7 +20,7 @@ const MyListingsFeed = () => { const handleProductModalToggle = () => { setShowModal(!showModal); - router.push("/"); + router.push(""); }; return ( diff --git a/components/my-listings/my-listings.tsx b/components/my-listings/my-listings.tsx index a577d47..c67b883 100644 --- a/components/my-listings/my-listings.tsx +++ b/components/my-listings/my-listings.tsx @@ -17,7 +17,7 @@ export const MyListingsPage = () => { const handleCreateNewListing = () => { if (usersPubkey) { - router.push("/?addNewListing"); + router.push("?addNewListing"); } else { onOpen(); } @@ -26,14 +26,6 @@ export const MyListingsPage = () => { return (
-
- -
{usersPubkey && ( { isMyListings={true} /> )} +
+ +
diff --git a/components/nav-top.tsx b/components/nav-top.tsx index b71205f..409ee0a 100644 --- a/components/nav-top.tsx +++ b/components/nav-top.tsx @@ -80,6 +80,7 @@ const TopNav = ({ const handleRoute = (path: string) => { if (signedIn) { router.push(path); + setIsMobileMenuOpen(false); } else { onOpen(); } @@ -88,6 +89,7 @@ const TopNav = ({ const handleHomeClick = () => { setFocusedPubkey(""); router.push("/"); + setIsMobileMenuOpen(false); }; const MobileMenu = () => ( diff --git a/pages/my-listings/index.tsx b/pages/my-listings/index.tsx index 17291bd..dc2f499 100644 --- a/pages/my-listings/index.tsx +++ b/pages/my-listings/index.tsx @@ -1,10 +1,10 @@ import React from "react"; -import MyListingsPage from "@/components/my-listings/my-listings"; +import MyListingsFeed from "@/components/my-listings/my-listings-feed"; export default function ShopView() { return (
- +
); }