'use client' import type { FC } from 'react' import React from 'react' import cn from 'classnames' import Item from './item' import type { Collection } from '@/app/components/tools/types' type Props = { className?: string currentIndex: number list: Collection[] onChosen: (index: number) => void } const ToolNavList: FC = ({ className, currentIndex, list, onChosen, }) => { return (
{list.map((item, index) => ( onChosen(index)}> ))}
) } export default React.memo(ToolNavList)