|
1 | 1 | import React, { useCallback, useContext, useEffect, useState } from 'react';
|
2 | 2 | import { makeStyles } from 'tss-react/mui';
|
3 | 3 | import { useDispatch } from 'react-redux';
|
4 |
| -import { Select, MenuItem, CircularProgress } from '@mui/material'; |
| 4 | +import { Select, MenuItem, CircularProgress, useTheme } from '@mui/material'; |
5 | 5 |
|
6 | 6 | import config, { getWormholeContextV2 } from 'config';
|
7 | 7 | import { isValidTxId } from 'utils';
|
@@ -72,6 +72,8 @@ function TxSearch() {
|
72 | 72 | const [error, setError] = useState('');
|
73 | 73 | const [loading, setLoading] = useState(false);
|
74 | 74 |
|
| 75 | + const theme = useTheme(); |
| 76 | + |
75 | 77 | const routeContext = useContext(RouteContext);
|
76 | 78 |
|
77 | 79 | function setChain(e: any) {
|
@@ -210,7 +212,16 @@ function TxSearch() {
|
210 | 212 | <AlertBanner show={!!error} content={error} error margin="0 0 16px 0" />
|
211 | 213 |
|
212 | 214 | <Button disabled={!state.chain || !state.tx} elevated onClick={search}>
|
213 |
| - {loading ? <CircularProgress size={24} /> : 'Search'} |
| 215 | + {loading ? ( |
| 216 | + <CircularProgress |
| 217 | + size={24} |
| 218 | + sx={{ |
| 219 | + color: theme.palette.primary.contrastText, |
| 220 | + }} |
| 221 | + /> |
| 222 | + ) : ( |
| 223 | + 'Search' |
| 224 | + )} |
214 | 225 | </Button>
|
215 | 226 | <div className={classes.footerNavBar}>
|
216 | 227 | <FooterNavBar />
|
|
0 commit comments