Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fixing check for update function

Mladen Sapundshiev0edc52bbf0f9
diff --git a/app/components/dialogs/AboutDialog.js b/app/components/dialogs/AboutDialog.js
index d87c84b43..ea470614e 100644
--- a/app/components/dialogs/AboutDialog.js
+++ b/app/components/dialogs/AboutDialog.js
@@ -52,7 +52,7 @@ const productName = versionMeta.name + (Pro ? ' Pro' : '');
document.title = productName + ' ' + versionMeta.version;
const AboutDialog = (props: Props) => {
- const [updateAvailable] = useState(false);
+ const [updateAvailable, setUpdateAvailable] = useState(false);
const [newVersion] = useState();
function checkForUpdates() {
@@ -69,12 +69,12 @@ const AboutDialog = (props: Props) => {
semver.valid(cleanedLastVersion) &&
semver.gt(cleanedLastVersion, cleanedCurrentVersion)
) {
- useState({
+ setUpdateAvailable({
updateAvailable: true,
newVersion: cleanedLastVersion.version
});
} else {
- useState({
+ setUpdateAvailable({
newVersion: versionMeta.version
});
}