Docs

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>
);
};

Returns

mutation object to remove given address as an admin