Open relayer app when clicking on grid tile

This commit is contained in:
Brandon Millman
2018-05-03 13:06:39 -07:00
parent fe0f4ae257
commit 6b92ef733c
2 changed files with 20 additions and 16 deletions

View File

@@ -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>
);
};