import React from 'react' import { ILatest } from '../interfaces/ILatest' export default function LatestList({ latest, onSelect, onRemove, }: { latest: ILatest[] onSelect: (l: ILatest) => void onRemove: (l: ILatest) => void }) { if (!latest || !latest.length) { return null } const latestElements = latest.map((item) => { const created = new Date(item.created) const subject = item.subject const hrefId = `#item-${item.id}` return (

  • onSelect(item)}>
    {subject}
    {created.toLocaleString()}
    onRemove(item)} href="#" title="Löschen" > ❌
  • ) }) return (

    Vergangene Briefe:

    ) }