mirror of
https://github.com/wassname/talk.git
synced 2026-08-11 11:27:10 +08:00
15 lines
339 B
JavaScript
15 lines
339 B
JavaScript
import React from 'react';
|
|
import {I18n} from '../coral-framework';
|
|
|
|
import timeago from 'timeago.js';
|
|
|
|
const lang = new I18n();
|
|
const name = 'coral-plugin-pubdate';
|
|
|
|
const PubDate = ({created_at}) => <div className={`${name }-text`}>
|
|
{timeago().format(created_at, lang.getLocale().replace('-', '_'))}
|
|
|
|
</div>;
|
|
|
|
export default PubDate;
|