From 65203ad9bc11b999b08db851a54575381fdb7d73 Mon Sep 17 00:00:00 2001 From: akshay027 Date: Mon, 14 Oct 2024 22:55:10 +0530 Subject: [PATCH] refactor changes --- .../(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/role-toggle.tsx | 2 +- .../app/(app)/authorization/roles/[roleId]/delete-role.tsx | 2 +- .../(app)/authorization/roles/[roleId]/permission-toggle.tsx | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/role-toggle.tsx b/apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/role-toggle.tsx index d7a7599cf1..ead8c6db78 100644 --- a/apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/role-toggle.tsx +++ b/apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/role-toggle.tsx @@ -78,7 +78,7 @@ export const RoleToggle: React.FC = ({ roleId, keyId, checked }) => { ), - error: (error) => `${error.message || "An error occurred while removing the role."}`, + error: (error) => `${error.message || "An error occurred while removing the Role."}`, }); }; diff --git a/apps/dashboard/app/(app)/authorization/roles/[roleId]/delete-role.tsx b/apps/dashboard/app/(app)/authorization/roles/[roleId]/delete-role.tsx index 590e3f832b..6909152583 100644 --- a/apps/dashboard/app/(app)/authorization/roles/[roleId]/delete-role.tsx +++ b/apps/dashboard/app/(app)/authorization/roles/[roleId]/delete-role.tsx @@ -62,7 +62,7 @@ export const DeleteRole: React.FC = ({ trigger, role }) => { toast.promise(deleteRole.mutateAsync({ roleId: role.id }), { loading: "Deleting Role", success: "Role deleted", - error: (error) => `${error.message || "An error occurred while deleting the role ."}`, + error: (error) => `${error.message || "An error occurred while deleting the Role ."}`, }); } diff --git a/apps/dashboard/app/(app)/authorization/roles/[roleId]/permission-toggle.tsx b/apps/dashboard/app/(app)/authorization/roles/[roleId]/permission-toggle.tsx index f53c983822..e7a14d0ec3 100644 --- a/apps/dashboard/app/(app)/authorization/roles/[roleId]/permission-toggle.tsx +++ b/apps/dashboard/app/(app)/authorization/roles/[roleId]/permission-toggle.tsx @@ -59,7 +59,6 @@ export const PermissionToggle: React.FC = ({ roleId, permissionId, checke const handleDisconnect = async (roleId: string, permissionId: string) => { setOptimisticChecked(false); - toast.error("My error toast"); toast.promise(disconnect.mutateAsync({ roleId, permissionId }), { loading: "Removing Permission ...", success: () => (