From 35c46551ee34de8af72108fcbe3c2492cdad4aa6 Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Pardo Date: Wed, 13 Apr 2022 15:47:15 +0200 Subject: [PATCH] Fixes for feedback in PR --- apps/api | 2 +- .../ee/components/apiKeys/ApiKeyDialogForm.tsx | 15 ++++++++++----- apps/web/ee/components/apiKeys/ApiKeyListItem.tsx | 3 ++- apps/website | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/apps/api b/apps/api index a064983002..557342104b 160000 --- a/apps/api +++ b/apps/api @@ -1 +1 @@ -Subproject commit a064983002b2b6dd288788c87eb8b218063af377 +Subproject commit 557342104b78b2cd72f5a078f5eb8f5c47f2b43d diff --git a/apps/web/ee/components/apiKeys/ApiKeyDialogForm.tsx b/apps/web/ee/components/apiKeys/ApiKeyDialogForm.tsx index 1374ec02ce..3e45ad3195 100644 --- a/apps/web/ee/components/apiKeys/ApiKeyDialogForm.tsx +++ b/apps/web/ee/components/apiKeys/ApiKeyDialogForm.tsx @@ -104,11 +104,16 @@ export default function ApiKeyDialogForm(props: {
{ - const newApiKey = await utils.client.mutation("viewer.apiKeys.create", event); - setNewApiKey(newApiKey); - setNewApiKeyDetails({ ...event }); - await utils.invalidateQueries(["viewer.apiKeys.list"]); - setSuccessfulNewApiKeyModal(true); + try { + const newApiKey = await utils.client.mutation("viewer.apiKeys.create", event); + setNewApiKey(newApiKey); + setNewApiKeyDetails({ ...event }); + await utils.invalidateQueries(["viewer.apiKeys.list"]); + setSuccessfulNewApiKeyModal(true); + } catch (error: any) { + console.log(error); + showToast(error.message, "error"); + } }} className="space-y-4">
diff --git a/apps/web/ee/components/apiKeys/ApiKeyListItem.tsx b/apps/web/ee/components/apiKeys/ApiKeyListItem.tsx index 2ba0440231..572f9cb65d 100644 --- a/apps/web/ee/components/apiKeys/ApiKeyListItem.tsx +++ b/apps/web/ee/components/apiKeys/ApiKeyListItem.tsx @@ -70,7 +70,8 @@ export default function ApiKeyListItem(props: { apiKey: TApiKeys; onEditApiKey: color="minimal" size="icon" StartIcon={PencilAltIcon} - className="ml-4 w-full self-center p-2"> + className="ml-4 w-full self-center p-2" + /> diff --git a/apps/website b/apps/website index b1b8ffda83..3df94a7d46 160000 --- a/apps/website +++ b/apps/website @@ -1 +1 @@ -Subproject commit b1b8ffda83a94760ab6763e02276c730c46a35fd +Subproject commit 3df94a7d46c3b75c0f9ca67a3dd42ec3776fa539