diff --git a/src/lib/hooks/use-layout-data.tsx b/src/lib/hooks/use-layout-data.tsx index f06c79a2d..008920b49 100644 --- a/src/lib/hooks/use-layout-data.tsx +++ b/src/lib/hooks/use-layout-data.tsx @@ -7,7 +7,7 @@ import { ProductPreviewType } from "types/global" import { CalculatedVariant } from "types/medusa" type LayoutCollection = { - id: string + handle: string title: string } @@ -30,7 +30,7 @@ const fetchCollectionData = async (): Promise => { } while (collections.length < count) return collections.map((c) => ({ - id: c.id, + handle: c.handle, title: c.title, })) } diff --git a/src/modules/collections/templates/index.tsx b/src/modules/collections/templates/index.tsx index eb92a47a4..7f466e4f8 100644 --- a/src/modules/collections/templates/index.tsx +++ b/src/modules/collections/templates/index.tsx @@ -3,7 +3,7 @@ import getNumberOfSkeletons from "@lib/util/get-number-of-skeletons" import repeat from "@lib/util/repeat" import ProductPreview from "@modules/products/components/product-preview" import SkeletonProductPreview from "@modules/skeletons/components/skeleton-product-preview" -import { fetchCollectionProducts } from "@pages/collections/[id]" +import { fetchCollectionProducts } from "@pages/collections/[handle]" import { useCart } from "medusa-react" import React, { useEffect } from "react" import { useInView } from "react-intersection-observer" diff --git a/src/modules/layout/components/dropdown-menu/index.tsx b/src/modules/layout/components/dropdown-menu/index.tsx index 1af37b6aa..e63eb2185 100644 --- a/src/modules/layout/components/dropdown-menu/index.tsx +++ b/src/modules/layout/components/dropdown-menu/index.tsx @@ -74,7 +74,7 @@ const DropdownMenu = () => { return (
setOpen(false)}> {collection.title} diff --git a/src/modules/layout/components/footer-nav/index.tsx b/src/modules/layout/components/footer-nav/index.tsx index 422efe6ba..9e1a7a38d 100644 --- a/src/modules/layout/components/footer-nav/index.tsx +++ b/src/modules/layout/components/footer-nav/index.tsx @@ -24,7 +24,7 @@ const FooterNav = () => { > {collections?.map((c) => (
  • - + {c.title}
  • diff --git a/src/modules/mobile-menu/components/main-menu/index.tsx b/src/modules/mobile-menu/components/main-menu/index.tsx index 998bf791f..e600902e1 100644 --- a/src/modules/mobile-menu/components/main-menu/index.tsx +++ b/src/modules/mobile-menu/components/main-menu/index.tsx @@ -78,7 +78,7 @@ const MainMenu = () => { <> {collections.map((collection) => (
  • - +