From 3c3f9ca85b1429821138840b6074503e58fab7e1 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 29 Jan 2018 10:44:30 +0100 Subject: Add network name to the select provider --- .../ts/components/top_bar/provider_picker.tsx | 27 ++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/components/top_bar/provider_picker.tsx b/packages/website/ts/components/top_bar/provider_picker.tsx index 418f8696b..4dc8ff0bd 100644 --- a/packages/website/ts/components/top_bar/provider_picker.tsx +++ b/packages/website/ts/components/top_bar/provider_picker.tsx @@ -34,12 +34,6 @@ export class ProviderPicker extends React.Component -
{this.props.injectedProviderName}
- {this._renderNetwork()} - - ); // Show dropdown with two options return (
@@ -51,29 +45,38 @@ export class ProviderPicker extends React.Component
); } + private _renderLabel(title: string, shouldShowNetwork: boolean) { + const label = ( +
+
{title}
+ {shouldShowNetwork && this._renderNetwork()} +
+ ); + return label; + } private _renderNetwork() { const networkName = constants.NETWORK_NAME_BY_ID[this.props.networkId]; return ( -
-
+
+
-
{networkName}
+
{networkName}
); } -- cgit