fix: check updates message fixes

This commit is contained in:
UndefinedPony
2024-12-20 14:01:55 +01:00
parent fac29b70a5
commit d9a1976cc0

View File

@@ -76,18 +76,18 @@ export const UpdateServer = () => {
className="w-full"
onClick={async () => {
await checkAndUpdateImage()
.then(async (e) => {
setIsUpdateAvailable(e);
.then(async (updateAvailable) => {
setIsUpdateAvailable(updateAvailable);
toast.info(updateAvailable ? "Update is available" : "No updates available");
})
.catch(() => {
setIsUpdateAvailable(false);
toast.error("Error to check updates");
toast.error("An error occurred while checking for updates, please try again.");
});
toast.success("Check updates");
}}
isLoading={isLoading}
>
Check Updates
{isLoading ? "Checking for updates..." : "Check for updates"}
</Button>
)}
</div>