Skip to content

Commit

Permalink
show server connection error msg on connection lost
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Jul 16, 2024
1 parent 28c62ac commit 2e0ca3c
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions client/src/Annotation/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,23 @@ export default () => {
setSettings(savedConfiguration)
if (savedConfiguration.images.length > 0) {
fetchImages(savedConfiguration.images, lastSavedImageIndex)
const showLab = settingsConfig.settings?.showLab || false
if (!isSettingsOpen && showLab) {
setShowLabel(showLab)
}
} else {
setSettings((prevSettings) => ({
...prevSettings,
images: [],
imagesBlob: [],
}))
}
}
const showLab = settingsConfig.settings?.showLab || false
if (!isSettingsOpen && showLab) {
setShowLabel(showLab)
}

} catch (error) {
if(!error) {
showSnackbar(t("error.server_connection"), "error")
}
console.error(error)
}
}
Expand Down

0 comments on commit 2e0ca3c

Please sign in to comment.