import { FC } from 'react'; import { Link, Stack, Text } from '@chakra-ui/react'; import NextLink from 'next/link'; import { NavLink } from '../../../types'; interface LinksListProps { links: NavLink[]; } export const LinksList: FC = ({ links }) => ( {links.map(({ id, to, items }) => { return to ? ( {id} {items && } ) : ( {id} {items && } ); })} );