diff --git a/app/product/[handle]/page.tsx b/app/product/[handle]/page.tsx index aeb7b0723..94a8d74f0 100644 --- a/app/product/[handle]/page.tsx +++ b/app/product/[handle]/page.tsx @@ -10,7 +10,6 @@ import { ProductDescription } from 'components/product/product-description'; import { HIDDEN_PRODUCT_TAG } from 'lib/constants'; import { getProduct, getProductRecommendations } from 'lib/shopify'; import { Image } from 'lib/shopify/types'; -import Link from 'next/link'; export const runtime = 'edge'; @@ -131,19 +130,18 @@ async function RelatedProducts({ id }: { id: string }) { key={product.handle} className="aspect-square w-full flex-none min-[475px]:w-1/2 sm:w-1/3 md:w-1/4 lg:w-1/5" > - - - + ))} diff --git a/app/search/[collection]/page.tsx b/app/search/[collection]/page.tsx index d7246f33f..f0504c129 100644 --- a/app/search/[collection]/page.tsx +++ b/app/search/[collection]/page.tsx @@ -8,7 +8,9 @@ import YMMFilters, { YMMFiltersPlaceholder } from 'components/filters'; import Grid from 'components/grid'; import ProductsList from 'components/layout/products-list'; import { getProductsInCollection } from 'components/layout/products-list/actions'; -import FiltersList from 'components/layout/search/filters/filters-list'; +import FiltersContainer, { + FiltersListPlaceholder +} from 'components/layout/search/filters/filters-container'; import MobileFilters from 'components/layout/search/filters/mobile-filters'; import SubMenu from 'components/layout/search/filters/sub-menu'; import Header, { HeaderPlaceholder } from 'components/layout/search/header'; @@ -47,60 +49,68 @@ async function CategoryPage({ return ( <> -
- } /> - -
-
- - -
- - {products.length === 0 ? ( -

{`No products found in this collection`}

- ) : ( - - )} -
-
-
-
- - ); -} - -export default function CategorySearchPage(props: { - params: { collection: string }; - searchParams?: { [key: string]: string | string[] | undefined }; -}) { - return ( - <> -
- } key={`breadcrumb-${props.params.collection}`}> - - -
- } key={`header-${props.params.collection}`}> -
- -
+
}>
- } key={`products-${props.params.collection}`}> - - +
+ } /> + +
+ + {products.length === 0 ? ( +

{`No products found in this collection`}

+ ) : ( + + )} +
); } + +export default async function CategorySearchPage(props: { + params: { collection: string }; + searchParams?: { [key: string]: string | string[] | undefined }; +}) { + return ( +
+ +
+
+ } key={`breadcrumb-${props.params.collection}`}> + + +
+ } key={`header-${props.params.collection}`}> +
+ + + } + key={`products-${props.params.collection}`} + > + + +
+
+ ); +} diff --git a/app/search/layout.tsx b/app/search/layout.tsx index cf7498f70..a3ebd12a5 100644 --- a/app/search/layout.tsx +++ b/app/search/layout.tsx @@ -1,10 +1,11 @@ import Footer from 'components/layout/footer'; +import { Suspense } from 'react'; export default function SearchLayout({ children }: { children: React.ReactNode }) { return ( <> -
- {children} +
+ {children}