import classNames from "classnames"; import { createBreakpoint, useLocalStorage } from "react-use"; import { Collection as CollectionType } from "@/type"; import { useCollections } from "@/components/main/hooks/useCollections"; import { Collection } from "./collection"; import { CollectionLoading } from "./loading"; const useBreakpoint = createBreakpoint({ XL: 1280, L: 1024, S: 768, XS: 640 }); export const Collections: React.FC<{ category: string }> = ({ category }) => { const { collections, loading } = useCollections(category); const breakpoint = useBreakpoint(); if (loading) return null; return (
{collections?.map((collection: CollectionType, i: number) => collection?.id === -1 ? ( ) : ( ) )}
); };