import Link from 'next/link' ; import * as React from 'react' ; import { Snippet } from '../models/Snippet' ; import { slugifyCategory } from '../utils/slugifyCategory' ; export const SnippetList = ( { snippets } ) => ( < > { snippets . map ( ( snippet ) => ( < Link href = { `/${ slugifyCategory ( snippet . category ) }/${ snippet . slug }` } key = { snippet . title } > < a className = "block-snippet" > < div className = "block-snippet__title" > { snippet . title } < /div> < /a> < /Link>))} < />);