Skip to content

Commit

Permalink
fix: show swap routes progress during initial loading
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Jul 21, 2022
1 parent 91495a9 commit 911a5c5
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
/* eslint-disable react/no-array-index-key */
import { Box, IconButtonProps } from '@mui/material';
import { IconButtonProps } from '@mui/material';
import { useSwapRoutes } from '../../hooks';
import { ProgressToNextUpdate } from '../ProgressToNextUpdate';

export const SwapRoutesUpdateProgress: React.FC<IconButtonProps> = ({
sx,
...other
}) => {
const { isLoading, isFetching, dataUpdatedAt, refetchTime, refetch } =
useSwapRoutes();

if (isLoading) {
return <Box width={24} height={24} sx={sx} />;
}
const { isFetching, dataUpdatedAt, refetchTime, refetch } = useSwapRoutes();

return (
<ProgressToNextUpdate
Expand Down

0 comments on commit 911a5c5

Please sign in to comment.