chore: Normalize "new" actions in settings (#2226)

* fix: Unauthorized request to views.list from shared documents

* Bump dep styled-components

* chore: Normalize 'new' actions in settings area to top right
chore: Add translation hooks to API tokens screen
chore: Move API tokens loading to paginated list
This commit is contained in:
Tom Moor
2021-06-15 19:10:50 -07:00
committed by GitHub
parent d85592b5f3
commit 2c39cd6496
5 changed files with 169 additions and 91 deletions

View File

@@ -4,17 +4,20 @@ import ApiKey from "models/ApiKey";
import Button from "components/Button";
import ListItem from "components/List/Item";
type Props = {
type Props = {|
token: ApiKey,
onDelete: (tokenId: string) => Promise<void>,
};
|};
const TokenListItem = ({ token, onDelete }: Props) => {
return (
<ListItem
key={token.id}
title={token.name}
subtitle={<code>{token.secret}</code>}
title={
<>
{token.name} <code>{token.secret}</code>
</>
}
actions={
<Button onClick={() => onDelete(token.id)} neutral>
Revoke