From c787dc735695be351b23e1e91b792da44e01fc11 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Mon, 14 May 2018 14:19:39 -0700 Subject: Fix linter errors and relayer index reloading --- .../ts/components/legacy_portal/legacy_portal.tsx | 2 +- packages/website/ts/components/portal/portal.tsx | 26 +++++++++++++--------- packages/website/ts/components/wallet/wallet.tsx | 3 +-- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/website/ts/components/legacy_portal/legacy_portal.tsx b/packages/website/ts/components/legacy_portal/legacy_portal.tsx index 002b258fb..a5ea95629 100644 --- a/packages/website/ts/components/legacy_portal/legacy_portal.tsx +++ b/packages/website/ts/components/legacy_portal/legacy_portal.tsx @@ -217,7 +217,7 @@ export class LegacyPortal extends React.Component { @@ -227,13 +227,17 @@ export class Portal extends React.Component { /> + - @@ -275,7 +279,7 @@ export class Portal extends React.Component { ); } - private _renderMenu(routeComponentProps: RouteComponentProps) { + private _renderMenu(routeComponentProps: RouteComponentProps): React.ReactNode { return (
@@ -283,7 +287,7 @@ export class Portal extends React.Component {
); } - private _renderWallet() { + private _renderWallet(): React.ReactNode { const allTokens = _.values(this.props.tokenByAddress); const trackedTokens = _.filter(allTokens, t => t.isTracked); return ( @@ -309,7 +313,7 @@ export class Portal extends React.Component { ); } - private _renderEthWrapper() { + private _renderEthWrapper(): React.ReactNode { return (
@@ -325,7 +329,7 @@ export class Portal extends React.Component<PortalProps, PortalState> { </div> ); } - private _renderTradeHistory() { + private _renderTradeHistory(): React.ReactNode { return ( <div> <Title labelText={'Trade History'} /> @@ -337,7 +341,7 @@ export class Portal extends React.Component<PortalProps, PortalState> { </div> ); } - private _renderTradeDirect(match: any, location: Location, history: History) { + private _renderTradeDirect(match: any, location: Location, history: History): React.ReactNode { return ( <div> <Title labelText={'Trade Direct'} /> @@ -349,7 +353,7 @@ export class Portal extends React.Component<PortalProps, PortalState> { </div> ); } - private _renderTokenBalances() { + private _renderTokenBalances(): React.ReactNode { const allTokens = _.values(this.props.tokenByAddress); const trackedTokens = _.filter(allTokens, t => t.isTracked); return ( @@ -371,7 +375,7 @@ export class Portal extends React.Component<PortalProps, PortalState> { </div> ); } - private _renderRelayerIndex() { + private _renderRelayerIndex(): React.ReactNode { return ( <div> <Title labelText={'Explore 0x Relayers'} /> diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx index ff7127604..b7c3d5229 100644 --- a/packages/website/ts/components/wallet/wallet.tsx +++ b/packages/website/ts/components/wallet/wallet.tsx @@ -239,9 +239,8 @@ export class Wallet extends React.Component<WalletProps, WalletState> { const userAddress = this.props.userAddress; const primaryText = utils.getAddressBeginAndEnd(userAddress); return ( - <Link to={`${WebsitePaths.Portal}/account`} style={{ textDecoration: 'none' }}> + <Link key={HEADER_ITEM_KEY} to={`${WebsitePaths.Portal}/account`} style={{ textDecoration: 'none' }}> <ListItem - key={HEADER_ITEM_KEY} primaryText={primaryText} leftIcon={<Identicon address={userAddress} diameter={ICON_DIMENSION} />} style={{ ...styles.paddedItem, ...styles.borderedItem }} -- cgit v1.2.3