Refactor
This commit is contained in:
@@ -102,15 +102,6 @@ class UpdateNotifier extends React.Component<Props, State> {
|
||||
this.props.actions.showUpdateDetails(false)
|
||||
}
|
||||
|
||||
public render() {
|
||||
return (
|
||||
<div>
|
||||
{this.renderUpdateNotification()}
|
||||
{this.renderUpdateDetails()}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
private renderUpdateNotification() {
|
||||
const snackbarAnchor: any = {
|
||||
vertical: 'top',
|
||||
@@ -207,7 +198,7 @@ class UpdateNotifier extends React.Component<Props, State> {
|
||||
|
||||
private renderDownloads() {
|
||||
const latestUpdate = this.state.newerVersions[0]
|
||||
if (!latestUpdate || !latestUpdate.assets) {
|
||||
if (!latestUpdate || !latestUpdate.assets) {
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -224,6 +215,15 @@ class UpdateNotifier extends React.Component<Props, State> {
|
||||
</div>
|
||||
))
|
||||
}
|
||||
|
||||
public render() {
|
||||
return (
|
||||
<div>
|
||||
{this.renderUpdateNotification()}
|
||||
{this.renderUpdateDetails()}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const styles = (theme: Theme) => ({
|
||||
|
||||
Reference in New Issue
Block a user