summaryrefslogtreecommitdiff
path: root/frontend/index.js
blob: e9de18014b979623549c836052d3c6174a5a3720 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(async () => {
	const timers = await fetchTimers();
	if (Array.isArray(timers[1]) && timers[1].length > 0) {
		window.location.href = './timer/';
	} else {
		const urlCookie = await cookieStore.get("last_used_url");

		if (urlCookie) {
			window.location.href = `./start/?machine=${urlCookie}`;
		} else {
			window.location.href = './status/'
		}
	}
})();