This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Suspense } from 'react';
|
||||
import { Product } from '@/types';
|
||||
import { Product, Brand, Category } from '@/types';
|
||||
import { Breadcrumb } from '@/components/Breadcrumb/Breadcrumb';
|
||||
import { CatalogSidebar } from '@/components/CatalogSidebar/CatalogSidebar';
|
||||
import { ProductCard } from '@/components/ProductCard/ProductCard';
|
||||
@@ -15,6 +15,9 @@ interface CatalogViewProps {
|
||||
breadcrumbItems: BreadcrumbItem[];
|
||||
basePath?: string;
|
||||
hiddenFilters?: string[];
|
||||
brands: Brand[];
|
||||
categories: Category[];
|
||||
allProducts?: Product[];
|
||||
}
|
||||
|
||||
export function CatalogView({
|
||||
@@ -22,11 +25,20 @@ export function CatalogView({
|
||||
breadcrumbItems,
|
||||
basePath = '/catalog',
|
||||
hiddenFilters,
|
||||
brands,
|
||||
categories,
|
||||
allProducts,
|
||||
}: CatalogViewProps) {
|
||||
return (
|
||||
<div className={styles.layout}>
|
||||
<Suspense fallback={null}>
|
||||
<CatalogSidebar basePath={basePath} hiddenFilters={hiddenFilters} />
|
||||
<CatalogSidebar
|
||||
basePath={basePath}
|
||||
hiddenFilters={hiddenFilters}
|
||||
brands={brands}
|
||||
categories={categories}
|
||||
products={allProducts ?? products}
|
||||
/>
|
||||
</Suspense>
|
||||
<div className={styles.main}>
|
||||
<div className={styles.header}>
|
||||
|
||||
Reference in New Issue
Block a user