Files
Atay-Makhzan/web_src/js/modules/worker.ts
T

10 lines
274 B
TypeScript
Raw Normal View History

import {sleep} from '../utils.ts';
2024-04-30 23:35:42 +08:00
const {appSubUrl} = window.config;
2024-11-21 14:57:42 +01:00
export async function logoutFromWorker(): Promise<void> {
2024-04-30 23:35:42 +08:00
// wait for a while because other requests (eg: logout) may be in the flight
await sleep(5000);
window.location.href = `${appSubUrl}/`;
}