From b9e2441cfcbf0c2a2b1b5334f597ab2de00e2ecc Mon Sep 17 00:00:00 2001 From: bitbeckers Date: Sun, 22 Dec 2024 13:03:54 +0100 Subject: [PATCH] fix(buy-button): add error and add id to listings component --- components/marketplace/buy-button.tsx | 2 ++ components/marketplace/hypercert-listings.tsx | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/marketplace/buy-button.tsx b/components/marketplace/buy-button.tsx index 16df841..371f5ff 100644 --- a/components/marketplace/buy-button.tsx +++ b/components/marketplace/buy-button.tsx @@ -7,6 +7,8 @@ export function BuyButton() { const listingsSection = document.getElementById("marketplace-listings"); if (listingsSection) { listingsSection.scrollIntoView({ behavior: "smooth" }); + } else { + console.error("Marketplace listings section not found"); } }; diff --git a/components/marketplace/hypercert-listings.tsx b/components/marketplace/hypercert-listings.tsx index 68569b6..96358b1 100644 --- a/components/marketplace/hypercert-listings.tsx +++ b/components/marketplace/hypercert-listings.tsx @@ -11,11 +11,11 @@ import NestedPagination from "../nested-pagination"; import HypercertListingsTable from "./hypercert-listings-table"; function ListingsListNoResults() { - return "No listings found"; + return We couldn't find any listings...; } function ListingsListLoadError() { - return We couldn't find any listings...; + return Error loading listings...; } const getListingsData = cache(async (params: GetAllListingsParams) => { @@ -59,7 +59,7 @@ export default async function HypercertListings({ } return ( -
+
}>