import LinkChip from "./Chip"

import styles from "./linkChips.module.css"

import type { LinkChipsProps } from "./linkChips"

export default function LinkChips({ chips }: LinkChipsProps) {
  if (!chips.length) {
    return null
  }

  return (
    <ul className={styles.linkChips}>
      {chips.map(({ url, title }) => (
        <li key={`link-chip-${title}`}>
          <LinkChip url={url} title={title} />
        </li>
      ))}
    </ul>
  )
}
