ui - handle session expired on ui

This commit is contained in:
Ishaan Jaff 2024-08-13 17:09:56 -07:00
parent cdce13434e
commit d85762b32f

View file

@ -29,6 +29,7 @@ const handleError = async (errorData: string) => {
message.info("UI Session Expired. Logging out.");
lastErrorTime = currentTime;
await sleep(3000); // 5 second sleep
document.cookie = "token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
window.location.href = baseUrl;
} else {
message.error(errorData);