Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
fix: loading animation on validators table
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-calavera committed Oct 8, 2019
1 parent 8e6e711 commit 6521a46
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/v2/components/Validators/Table/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,25 @@ import getUptime from 'v2/utils/getUptime';
import Avatar from 'v2/components/UI/Avatar';

import {LAMPORT_SOL_RATIO} from '../../../constants';
import Socket from '../../../stores/socket';
import Loader from '../../UI/Loader';
import useStyles from './styles';

const ValidatorsTable = ({separate}: {separate: boolean}) => {
const classes = useStyles();
const theme = useTheme();
const showTable = useMediaQuery(theme.breakpoints.up('md'));
const {activeValidators, inactiveValidators} = NodesStore;
const {isLoading} = Socket;

if (isLoading) {
return (
<div className={classes.loader}>
<Loader width="100%" height={100} />
</div>
);
}

const renderRow = row => {
const uptime = row.uptime && getUptime(row);
const {identity = {}, nodePubkey, activatedStake, commission} = row;
Expand Down
3 changes: 3 additions & 0 deletions src/v2/components/Validators/Table/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export default makeStyles(theme => ({
marginBottom: 50,
},
},
loader: {
marginTop: 14,
},
separateRoot: {
padding: 0,
background: 'transparent',
Expand Down

0 comments on commit 6521a46

Please sign in to comment.