Add toast for revoked api key
This commit is contained in:
parent
d1e5dca3d0
commit
0b6d31373d
2 changed files with 10 additions and 6 deletions
|
@ -6,9 +6,8 @@ const nextConfig = {
|
|||
experimental: {
|
||||
// esmExternals: true,
|
||||
appDir: true,
|
||||
serverComponentsExternalPackages: ["prisma", "@prisma/client"]
|
||||
serverComponentsExternalPackages: ["prisma", "@prisma/client"],
|
||||
},
|
||||
output: "standalone",
|
||||
rewrites() {
|
||||
return [
|
||||
{
|
||||
|
@ -27,9 +26,6 @@ const nextConfig = {
|
|||
env: {
|
||||
NEXT_PUBLIC_DRIFT_URL: process.env.DRIFT_URL
|
||||
},
|
||||
typescript: {
|
||||
// ignoreBuildErrors: true,
|
||||
}
|
||||
}
|
||||
|
||||
export default bundleAnalyzer({ enabled: process.env.ANALYZE === "true" })(
|
||||
|
|
|
@ -57,6 +57,14 @@ const APIKeys = ({
|
|||
}
|
||||
}
|
||||
|
||||
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…
Reference in a new issue