TimeAgoMessage.jsx 345 B

123456789101112
  1. import TimeAgo from 'react-timeago'
  2. import frenchStrings from 'react-timeago/lib/language-strings/fr'
  3. import buildFormatter from 'react-timeago/lib/formatters/buildFormatter'
  4. export const TimeAgoMessage = () => {
  5. const formatter = buildFormatter(frenchStrings)
  6. return (
  7. <TimeAgo date='Feb 1, 1966' formatter={formatter} />
  8. )
  9. }