import React from 'react' import { ILatest } from '../interfaces/ILatest' import Button from './Button' 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 (