mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: check updates message fixes
This commit is contained in:
@@ -76,18 +76,18 @@ export const UpdateServer = () => {
|
|||||||
className="w-full"
|
className="w-full"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
await checkAndUpdateImage()
|
await checkAndUpdateImage()
|
||||||
.then(async (e) => {
|
.then(async (updateAvailable) => {
|
||||||
setIsUpdateAvailable(e);
|
setIsUpdateAvailable(updateAvailable);
|
||||||
|
toast.info(updateAvailable ? "Update is available" : "No updates available");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
setIsUpdateAvailable(false);
|
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}
|
isLoading={isLoading}
|
||||||
>
|
>
|
||||||
Check Updates
|
{isLoading ? "Checking for updates..." : "Check for updates"}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user