aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Agosti <francesco.agosti93@gmail.com>2018-09-26 23:40:12 +0800
committerGitHub <noreply@github.com>2018-09-26 23:40:12 +0800
commit78a693e092136aea64418954491e6b25c38a67d9 (patch)
tree62a59849dabc2902d8b7e8725cc1c8a7e1adcff2
parent30525d15f468dc084f923b280b265cb8d5fd4975 (diff)
parentd20f713fade2d23e847dfb349938730ca95cbf15 (diff)
downloaddexon-sol-tools-78a693e092136aea64418954491e6b25c38a67d9.tar
dexon-sol-tools-78a693e092136aea64418954491e6b25c38a67d9.tar.gz
dexon-sol-tools-78a693e092136aea64418954491e6b25c38a67d9.tar.bz2
dexon-sol-tools-78a693e092136aea64418954491e6b25c38a67d9.tar.lz
dexon-sol-tools-78a693e092136aea64418954491e6b25c38a67d9.tar.xz
dexon-sol-tools-78a693e092136aea64418954491e6b25c38a67d9.tar.zst
dexon-sol-tools-78a693e092136aea64418954491e6b25c38a67d9.zip
Merge pull request #1088 from 0xProject/fix/website/relayers-column
[website] When number of relayers is less than number of columns, reduce column…
-rw-r--r--packages/website/ts/components/relayer_index/relayer_index.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/website/ts/components/relayer_index/relayer_index.tsx b/packages/website/ts/components/relayer_index/relayer_index.tsx
index 4aea1bbbb..91dbeb27a 100644
--- a/packages/website/ts/components/relayer_index/relayer_index.tsx
+++ b/packages/website/ts/components/relayer_index/relayer_index.tsx
@@ -56,7 +56,11 @@ export class RelayerIndex extends React.Component<RelayerIndexProps, RelayerInde
</div>
);
} else {
- const numberOfColumns = this._numberOfColumnsForScreenWidth(this.props.screenWidth);
+ const numberOfRelayers = this.state.relayerInfos.length;
+ const numberOfColumns = Math.min(
+ numberOfRelayers,
+ this._numberOfColumnsForScreenWidth(this.props.screenWidth),
+ );
return (
<GridList
cellHeight={CELL_HEIGHT}