diff options
Diffstat (limited to 'frontend/index.js')
| -rw-r--r-- | frontend/index.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/frontend/index.js b/frontend/index.js new file mode 100644 index 0000000..12f1e97 --- /dev/null +++ b/frontend/index.js @@ -0,0 +1,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 && urlCookie != null && urlCookie != "null") { + window.location.href = `./start/?machine=${urlCookie.value}`; + } else { + window.location.href = './status/' + } + } +})(); |
