using button loading props vs Loader component (#1677)

This commit is contained in:
Peer Richelsen 2022-02-01 21:52:54 +00:00 committed by GitHub
parent 1d10874890
commit aa28cf0641
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -610,12 +610,9 @@ function Web3ConnectBtn() {
utils.invalidateQueries("viewer.web3Integration"); utils.invalidateQueries("viewer.web3Integration");
}; };
if (mutation.isLoading) {
return <Loader />;
}
return ( return (
<Button <Button
loading={mutation.isLoading}
color={connectionBtn ? "warn" : "secondary"} color={connectionBtn ? "warn" : "secondary"}
disabled={result.isLoading || mutation.isLoading} disabled={result.isLoading || mutation.isLoading}
onClick={async () => await enableOrDisableWeb3(mutation)} onClick={async () => await enableOrDisableWeb3(mutation)}