import Link from 'next/link' import React from 'react' import { ChevronRight } from 'react-feather' import Picture from './Picture' interface Props { title: string date: Date image?: string alt?: string link: string } const months = [ 'le 13eme mois', 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre', ] export default class Element extends React.Component { public render() { let date = this.props.date if (typeof this.props.date === 'string') { date = new Date(this.props.date) } const t = `${date.getDate()} ${months[date.getMonth()]} ${date.getFullYear()}` return (
{this.props.image ? ( ) : (
)} Le {t} {this.props.title}
) } }