mirror of
https://github.com/trezor/trezor-wallet
synced 2025-07-29 09:59:02 +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) => {
|
export default (props: Props) => {
|
||||||
const { network, notification } = props.selectedAccount;
|
const { network, notification } = props.selectedAccount;
|
||||||
if (!network || !notification) return null;
|
if (!network || !notification) return null;
|
||||||
|
const blockchain = props.blockchain.find(b => b.shortcut === network.shortcut);
|
||||||
|
|
||||||
if (notification.type === 'backend') {
|
if (notification.type === 'backend') {
|
||||||
// special case: backend is down
|
// special case: backend is down
|
||||||
@ -17,6 +18,7 @@ export default (props: Props) => {
|
|||||||
type="error"
|
type="error"
|
||||||
title={notification.title}
|
title={notification.title}
|
||||||
message={notification.message}
|
message={notification.message}
|
||||||
|
isActionInProgress={blockchain && blockchain.connecting}
|
||||||
actions={
|
actions={
|
||||||
[{
|
[{
|
||||||
label: 'Connect',
|
label: 'Connect',
|
||||||
|
Loading…
Reference in New Issue
Block a user