diff --git a/components/Buttons/UpdateButton.js b/components/Buttons/UpdateButton.js
index 59cacceea..3894a5328 100644
--- a/components/Buttons/UpdateButton.js
+++ b/components/Buttons/UpdateButton.js
@@ -1,7 +1,6 @@
import React, { PropTypes } from 'react';
import cx from 'classnames';
-import store from '../../core/store';
-import { fetchWebuiVersionUpdate } from '../../core/actions';
+import { updateWebuiAsync } from '../../core/actions';
class UpdateButton extends React.Component {
static propTypes = {
@@ -14,8 +13,7 @@ class UpdateButton extends React.Component {
}
handleClick() {
- let state = store.getState();
- store.dispatch(fetchWebuiVersionUpdate(state.activeApiKey));
+ updateWebuiAsync();
}
render() {
diff --git a/components/Layout/Header.js b/components/Layout/Header.js
index 3bd1a4afb..89fff60a1 100644
--- a/components/Layout/Header.js
+++ b/components/Layout/Header.js
@@ -9,6 +9,7 @@ import SidebarToggle from '../Buttons/SidebarToggle';
import UpdateButton from '../Buttons/UpdateButton';
import Notifications from './Notifications';
+
class Header extends React.Component {
render() {
const { countHasher, countGeneral, countImages, autoUpdate, sidebarToggle, updateAvailable } = this.props;
@@ -24,7 +25,6 @@ class Header extends React.Component {