mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-29 02:18:06 +00:00
add loading state to a connect button when connecting to backend
This commit is contained in:
parent
1b1fbb45f5
commit
472d1cd453
@ -8,6 +8,7 @@ import type { Props } from '../../index';
|
||||
export default (props: Props) => {
|
||||
const { network, notification } = props.selectedAccount;
|
||||
if (!network || !notification) return null;
|
||||
const blockchain = props.blockchain.find(b => b.shortcut === network.shortcut);
|
||||
|
||||
if (notification.type === 'backend') {
|
||||
// special case: backend is down
|
||||
@ -17,6 +18,7 @@ export default (props: Props) => {
|
||||
type="error"
|
||||
title={notification.title}
|
||||
message={notification.message}
|
||||
isActionInProgress={blockchain && blockchain.connecting}
|
||||
actions={
|
||||
[{
|
||||
label: 'Connect',
|
||||
|
Loading…
Reference in New Issue
Block a user