aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-04-21 03:36:00 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-04-21 03:36:40 +0800
commitc453012a8e28b32b71c90717c3976ace5f89e9b0 (patch)
tree81ed078a2509bbd7efd46accf84bc835b5072de5
parent12d8c0b6af7950e8aef12022007bd490fcf2ddaf (diff)
downloaddexon-sol-tools-c453012a8e28b32b71c90717c3976ace5f89e9b0.tar
dexon-sol-tools-c453012a8e28b32b71c90717c3976ace5f89e9b0.tar.gz
dexon-sol-tools-c453012a8e28b32b71c90717c3976ace5f89e9b0.tar.bz2
dexon-sol-tools-c453012a8e28b32b71c90717c3976ace5f89e9b0.tar.lz
dexon-sol-tools-c453012a8e28b32b71c90717c3976ace5f89e9b0.tar.xz
dexon-sol-tools-c453012a8e28b32b71c90717c3976ace5f89e9b0.tar.zst
dexon-sol-tools-c453012a8e28b32b71c90717c3976ace5f89e9b0.zip
Add specific render path for error and loading
-rw-r--r--packages/website/ts/components/relayer_index/relayer_index.tsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/website/ts/components/relayer_index/relayer_index.tsx b/packages/website/ts/components/relayer_index/relayer_index.tsx
index 3881b97bb..50760c32d 100644
--- a/packages/website/ts/components/relayer_index/relayer_index.tsx
+++ b/packages/website/ts/components/relayer_index/relayer_index.tsx
@@ -54,10 +54,9 @@ export class RelayerIndex extends React.Component<RelayerIndexProps, RelayerInde
this._isUnmounted = true;
}
public render() {
- // TODO: loading and error states with a scrolling container
const readyToRender = _.isUndefined(this.state.error) && !_.isUndefined(this.state.relayerInfos);
- return (
- readyToRender && (
+ if (readyToRender) {
+ return (
<div style={styles.root}>
<GridList
cellHeight={CELL_HEIGHT}
@@ -74,8 +73,11 @@ export class RelayerIndex extends React.Component<RelayerIndexProps, RelayerInde
))}
</GridList>
</div>
- )
- );
+ );
+ } else {
+ // TODO: loading and error states with a scrolling container
+ return null;
+ }
}
private async _fetchRelayerInfosAsync(): Promise<void> {
try {