mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
26 lines
687 B
TypeScript
26 lines
687 B
TypeScript
import { FC } from 'react';
|
|
import { ICatalogNode } from '../../../../api';
|
|
import { CatalogNavigationItemView } from './CatalogNavigationItemView';
|
|
|
|
export interface CatalogNavigationSetViewProps
|
|
{
|
|
node: ICatalogNode;
|
|
child?: boolean;
|
|
}
|
|
|
|
export const CatalogNavigationSetView: FC<CatalogNavigationSetViewProps> = props =>
|
|
{
|
|
const { node = null, child = false } = props;
|
|
|
|
return (
|
|
<>
|
|
{ node && (node.children.length > 0) && node.children.map((n, index) =>
|
|
{
|
|
if(!n.isVisible) return null;
|
|
|
|
return <CatalogNavigationItemView key={ index } child={ child } node={ n } />;
|
|
}) }
|
|
</>
|
|
);
|
|
};
|