Add toast for revoked api key
This commit is contained in:
parent
d1e5dca3d0
commit
0b6d31373d
2 changed files with 10 additions and 6 deletions
|
@ -56,6 +56,14 @@ const APIKeys = ({
|
|||
setSubmitting(false)
|
||||
}
|
||||
}
|
||||
|
||||
const onRevoke = (tokenId: string) => {
|
||||
expireToken(tokenId)
|
||||
setToast({
|
||||
message: "Your API key has been revoked.",
|
||||
type: "success"
|
||||
})
|
||||
}
|
||||
|
||||
const hasError = Boolean(error)
|
||||
return (
|
||||
|
@ -106,7 +114,7 @@ const APIKeys = ({
|
|||
<td>
|
||||
<Button
|
||||
type="button"
|
||||
onClick={() => expireToken(token.id)}
|
||||
onClick={() => onRevoke(token.id)}
|
||||
>
|
||||
Revoke
|
||||
</Button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue