Fix options page bridge section not showing

This commit is contained in:
hensm
2020-01-23 15:35:24 +00:00
parent 23f431d30b
commit 13dfb26dd4
2 changed files with 7 additions and 6 deletions

View File

@@ -58,8 +58,7 @@ const BridgeStats = (props: BridgeStatsProps) => (
interface BridgeProps { interface BridgeProps {
info: BridgeInfo; info?: BridgeInfo;
platform: string;
loading: boolean; loading: boolean;
} }

View File

@@ -136,6 +136,10 @@ class OptionsApp extends Component<{}, OptionsAppState> {
}); });
} catch { } catch {
logger.error("Failed to fetch bridge/platform info."); logger.error("Failed to fetch bridge/platform info.");
this.setState({
bridgeLoading: false
});
} }
} }
@@ -146,10 +150,8 @@ class OptionsApp extends Component<{}, OptionsAppState> {
return ( return (
<div> <div>
{ this.state.bridgeInfo && this.state.platform && <Bridge info={ this.state.bridgeInfo }
<Bridge info={ this.state.bridgeInfo } loading={ this.state.bridgeLoading } />
platform={ this.state.platform }
loading={ this.state.bridgeLoading } /> }
<form id="form" ref={ form => { this.form = form; }} <form id="form" ref={ form => { this.form = form; }}
onSubmit={ this.handleFormSubmit } onSubmit={ this.handleFormSubmit }