import { formatDistance } from 'date-fns'; import { useState } from 'react'; import { Button, Icon, Modal, PasswordField, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Text, } from 'react-basics'; import ApiKeyDeleteForm from 'components/pages/settings/account/ApiKeyDeleteForm'; import Trash from 'assets/trash.svg'; import styles from './ApiKeysTable.module.css'; const columns = [ { name: 'apiKey', label: 'Key', style: { flex: 3 } }, { name: 'created', label: 'Created', style: { flex: 1 } }, { name: 'action', label: ' ', style: { flex: 1 } }, ]; export default function ApiKeysTable({ data = [], onSave }) { const [apiKeyId, setApiKeyId] = useState(null); const handleSave = () => { setApiKeyId(null); onSave(); }; const handleClose = () => { setApiKeyId(null); }; const handleDelete = id => { setApiKeyId(id); }; return ( <>