From b3e53b609b997921aa11063f7ccb513682d1c621 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Mon, 14 May 2018 22:49:08 -0700 Subject: Change to weekly txn volume --- packages/website/ts/components/relayer_index/relayer_grid_tile.tsx | 6 +++--- packages/website/ts/types.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/website') 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 592bff29f..5964dcd56 100644 --- a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx +++ b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx @@ -47,7 +47,7 @@ const styles: Styles = { width: '100%', boxSizing: 'border-box', }, - dailyTradeVolumeLabel: { + weeklyTradeVolumeLabel: { fontSize: 14, color: colors.mediumBlue, }, @@ -80,9 +80,9 @@ export const RelayerGridTile: React.StatelessComponent = (
{props.relayerInfo.name}
-
{props.relayerInfo.dailyTxnVolume}
+
{props.relayerInfo.weeklyTxnVolume}
- Daily Trade Volume + Weekly Trade Volume
diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index 58929a0c6..5caf5e73c 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -506,7 +506,7 @@ export interface TokenState { export interface WebsiteBackendRelayerInfo { name: string; - dailyTxnVolume: string; + weeklyTxnVolume: string; url: string; appUrl?: string; headerImgUrl?: string; -- cgit v1.2.3 From ca08dd9705c2aefb092b10926af359ed8fabac79 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 15 May 2018 00:52:51 -0700 Subject: Add hover state to top tokens --- .../relayer_index/relayer_top_tokens.tsx | 53 ++++++++++++++++++---- 1 file changed, 43 insertions(+), 10 deletions(-) (limited to 'packages/website') diff --git a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx b/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx index 468a350e4..03c70c9dd 100644 --- a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx +++ b/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx @@ -26,21 +26,54 @@ export const TopTokens: React.StatelessComponent = (props: TopTo {_.map(props.tokens, (tokenInfo: WebsiteBackendTokenInfo, index: number) => { const firstItemStyle = { ...styles.tokenLabel, ...styles.followingTokenLabel }; const style = index !== 0 ? firstItemStyle : styles.tokenLabel; - return ( - - {tokenInfo.symbol} - - ); + return ; })}
); }; +interface TokenLinkProps { + tokenInfo: WebsiteBackendTokenInfo; + style: React.CSSProperties; + networkId: number; +} +interface TokenLinkState { + isHovering: boolean; +} + +class TokenLink extends React.Component { + constructor(props: TokenLinkProps) { + super(props); + this.state = { + isHovering: false, + }; + } + public render(): React.ReactNode { + const style = { + ...this.props.style, + cursor: 'pointer', + opacity: this.state.isHovering ? 0.5 : 1, + }; + return ( + + {this.props.tokenInfo.symbol} + + ); + } + private _onToggleHover(isHovering: boolean): void { + this.setState({ + isHovering, + }); + } +} + function tokenLinkFromToken(tokenInfo: WebsiteBackendTokenInfo, networkId: number): string { return sharedUtils.getEtherScanLinkIfExists(tokenInfo.address, networkId, EtherscanLinkSuffixes.Address); } -- cgit v1.2.3