From 0b6d31373daf5acdadb59a4e35c90630243b1044 Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Thu, 23 Feb 2023 23:45:26 -0800 Subject: [PATCH] Add toast for revoked api key --- next.config.mjs | 6 +----- .../(drift)/settings/components/sections/api-keys.tsx | 10 +++++++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 63e6f42f..7786a8fd 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -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" })( diff --git a/src/app/(drift)/settings/components/sections/api-keys.tsx b/src/app/(drift)/settings/components/sections/api-keys.tsx index dc1fb919..b2def338 100644 --- a/src/app/(drift)/settings/components/sections/api-keys.tsx +++ b/src/app/(drift)/settings/components/sections/api-keys.tsx @@ -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 = ({