mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 19:26:33 +00:00
Fix theme warnings
Changelog-entry: Fix theme warnings Change-type: patch
This commit is contained in:
parent
f1be4f50a3
commit
4a6a471345
@ -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>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user