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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user