Fix theme warnings

Changelog-entry: Fix theme warnings
Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2020-05-06 16:15:47 +02:00
parent f1be4f50a3
commit 4a6a471345

View File

@ -130,14 +130,12 @@ export class MainPage extends React.Component<
});
}
public render() {
private renderMain() {
const shouldDriveStepBeDisabled = !this.state.hasImage;
const shouldFlashStepBeDisabled =
!this.state.hasImage || !this.state.hasDrive;
if (this.state.current === 'main') {
return (
<ThemedProvider style={{ height: '100%', width: '100%' }}>
<>
<header
id="app-header"
style={{
@ -246,9 +244,7 @@ export class MainPage extends React.Component<
: ''
}
driveTitle={middleEllipsis(this.state.driveTitle, 16)}
shouldShow={
this.state.isFlashing && this.state.isWebviewShowing
}
shouldShow={this.state.isFlashing && this.state.isWebviewShowing}
/>
</div>
@ -260,9 +256,11 @@ export class MainPage extends React.Component<
/>
</div>
</Flex>
</ThemedProvider>
</>
);
} else if (this.state.current === 'success') {
}
private renderSuccess() {
return (
<div className="section-loader isFinish">
<FinishPage goToMain={() => this.setState({ current: 'main' })} />
@ -270,6 +268,15 @@ export class MainPage extends React.Component<
</div>
);
}
public render() {
return (
<ThemedProvider style={{ height: '100%', width: '100%' }}>
{this.state.current === 'main'
? this.renderMain()
: this.renderSuccess()}
</ThemedProvider>
);
}
}