Skip to content

Commit

Permalink
refactor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshayBandi027 committed Oct 14, 2024
1 parent 38037ee commit 65203ad
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const RoleToggle: React.FC<Props> = ({ roleId, keyId, checked }) => {
</div>
</div>
),
error: (error) => `${error.message || "An error occurred while removing the role."}`,
error: (error) => `${error.message || "An error occurred while removing the Role."}`,
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const DeleteRole: React.FC<Props> = ({ 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 ."}`,
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export const PermissionToggle: React.FC<Props> = ({ 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: () => (
Expand Down

0 comments on commit 65203ad

Please sign in to comment.