mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
74dce1d55d
- Modern card-based layout with vertical icon rail, breadcrumb nav, inline search - Admin mode: edit/create/delete pages and offers, drag & drop reorder via HK API - Favorites system: heart on furni, star on pages, localStorage persistence - Redesigned product card with price pills, dynamic quantity spinner - Upgraded trophies (filter tabs, parchment textarea), pets (breed/color flow), custom prefix (dynamic color boxes) - Font fix: Ubuntu Regular, proper @font-face declarations - New Tailwind design tokens and CatalogTexts.json for localization
28 lines
927 B
TypeScript
28 lines
927 B
TypeScript
import { FC } from 'react';
|
|
import { ICatalogNode } from '../../../../api';
|
|
import { useCatalog } from '../../../../hooks';
|
|
import { CatalogNavigationItemView } from './CatalogNavigationItemView';
|
|
import { CatalogNavigationSetView } from './CatalogNavigationSetView';
|
|
|
|
export interface CatalogNavigationViewProps
|
|
{
|
|
node: ICatalogNode;
|
|
}
|
|
|
|
export const CatalogNavigationView: FC<CatalogNavigationViewProps> = props =>
|
|
{
|
|
const { node = null } = props;
|
|
const { searchResult = null } = useCatalog();
|
|
|
|
return (
|
|
<div className="flex flex-col gap-px px-0.5 py-0.5">
|
|
{ searchResult && (searchResult.filteredNodes.length > 0) && searchResult.filteredNodes.map((n, index) =>
|
|
{
|
|
return <CatalogNavigationItemView key={ index } node={ n } />;
|
|
}) }
|
|
{ !searchResult &&
|
|
<CatalogNavigationSetView node={ node } /> }
|
|
</div>
|
|
);
|
|
};
|