import PropTypes from 'prop-types'; import React from 'react'; class APIKeyForm extends React.Component { constructor(props) { super(props); this.state = { keyLabel: '' }; this.addKey = this.addKey.bind(this); } addKey(event) { event.preventDefault(); document.getElementById('addKeyForm').reset(); this.props.addApiKey(this.state.keyLabel); this.state.keyLabel = ''; return false; } removeKey(keyId) { this.props.removeApiKey(keyId); } render() { return (
{v.label} Created on: {v.createdAt} |
Last used on: {v.lastUsedAt} |