superdesk/superdesk-client-core

View on GitHub
scripts/apps/contacts/components/TimeElem.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react';
import PropTypes from 'prop-types';

export const TimeElem: React.StatelessComponent<any> = ({svc, date}) => {
    const {datetime} = svc;

    return (
        <time title={datetime.longFormat(date)}>
            {datetime.shortFormat(date)}
        </time>
    );
};

TimeElem.propTypes = {
    svc: PropTypes.object.isRequired,
    date: PropTypes.any,
};