import PropTypes from 'prop-types'; import React from 'react'; import InlineSVG from 'react-inlinesvg'; import format from 'date-fns/format'; import distanceInWordsToNow from 'date-fns/distance_in_words_to_now'; import orderBy from 'lodash/orderBy'; import { APIKeyPropType } from './APIKeyForm'; const trashCan = require('../../../images/trash-can.svg'); function APIKeyList({ apiKeys, onRemove }) { return (
Name | Created on | Last used | Actions |
---|---|---|---|
{key.label} | {format(new Date(key.createdAt), 'MMM D, YYYY h:mm A')} | {distanceInWordsToNow(new Date(key.lastUsedAt), { addSuffix: true })} |