useRemoveAdmin

Remove an admin on the smart wallet account. This action has to be performed by an admin on the account.

import { useRemoveAdmin } from "@thirdweb-dev/react";
const adminAddress = "{{admin_address}}";
const Component = () => {
const { mutate: removeAdmin, isLoading, error } = useRemoveAdmin();
if (error) {
console.error("failed to remove admin", error);
}
return (
<button
disabled={isLoading}
onClick={() => removeAdmin(adminAddress)}
>
Remove admin
</button>
);
};
function useRemoveAdmin(): UseMutationResult<
unknown,
string
>;

Returns

let returnType: UseMutationResult<TransactionResult, unknown, string>;

mutation object to remove given address as an admin