aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-05-04 04:06:39 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-05-04 04:59:08 +0800
commit6b92ef733c6f1cfd1772433abfdc9fd82227fa8b (patch)
tree4cfbcb01321cc106644804a320aab04b3c102dbf /packages
parentfe0f4ae25759eb6b6cad8c6608ebff526366c059 (diff)
downloaddexon-sol-tools-6b92ef733c6f1cfd1772433abfdc9fd82227fa8b.tar
dexon-sol-tools-6b92ef733c6f1cfd1772433abfdc9fd82227fa8b.tar.gz
dexon-sol-tools-6b92ef733c6f1cfd1772433abfdc9fd82227fa8b.tar.bz2
dexon-sol-tools-6b92ef733c6f1cfd1772433abfdc9fd82227fa8b.tar.lz
dexon-sol-tools-6b92ef733c6f1cfd1772433abfdc9fd82227fa8b.tar.xz
dexon-sol-tools-6b92ef733c6f1cfd1772433abfdc9fd82227fa8b.tar.zst
dexon-sol-tools-6b92ef733c6f1cfd1772433abfdc9fd82227fa8b.zip
Open relayer app when clicking on grid tile
Diffstat (limited to 'packages')
-rw-r--r--packages/website/ts/components/relayer_index/relayer_grid_tile.tsx35
-rw-r--r--packages/website/ts/types.ts1
2 files changed, 20 insertions, 16 deletions
diff --git a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx
index 7d0551581..0b9b8165e 100644
--- a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx
+++ b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx
@@ -94,24 +94,27 @@ const styles: Styles = {
};
export const RelayerGridTile: React.StatelessComponent<RelayerGridTileProps> = (props: RelayerGridTileProps) => {
+ const link = props.relayerInfo.appUrl || props.relayerInfo.url;
return (
- <GridTile style={styles.root}>
- <div style={styles.innerDiv}>
- <img src={props.relayerInfo.headerImgUrl} style={styles.header} />
- <div style={styles.body}>
- <div className="py1" style={styles.relayerNameLabel}>
- {props.relayerInfo.name}
- </div>
- <div style={styles.dailyTradeVolumeLabel}>{props.relayerInfo.dailyTxnVolume}</div>
- <div className="py1" style={styles.subLabel}>
- Daily Trade Volume
- </div>
- <TopTokens tokens={topTokens} networkId={props.networkId} />
- <div className="py1" style={styles.subLabel}>
- Top tokens
+ <a href={link} target="_blank" style={{ textDecoration: 'none' }}>
+ <GridTile style={styles.root}>
+ <div style={styles.innerDiv}>
+ <img src={props.relayerInfo.headerImgUrl} style={styles.header} />
+ <div style={styles.body}>
+ <div className="py1" style={styles.relayerNameLabel}>
+ {props.relayerInfo.name}
+ </div>
+ <div style={styles.dailyTradeVolumeLabel}>{props.relayerInfo.dailyTxnVolume}</div>
+ <div className="py1" style={styles.subLabel}>
+ Daily Trade Volume
+ </div>
+ <TopTokens tokens={topTokens} networkId={props.networkId} />
+ <div className="py1" style={styles.subLabel}>
+ Top tokens
+ </div>
</div>
</div>
- </div>
- </GridTile>
+ </GridTile>
+ </a>
);
};
diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts
index 484f09e5d..693077ee6 100644
--- a/packages/website/ts/types.ts
+++ b/packages/website/ts/types.ts
@@ -507,6 +507,7 @@ export interface WebsiteBackendRelayerInfo {
name: string;
dailyTxnVolume: string;
url: string;
+ appUrl?: string;
headerImgUrl: string;
}