馃 distributed transcription service
thistle.dunkirk.sh
1document.getElementById("start-btn")?.addEventListener("click", async () => {
2 const authComponent = document.querySelector("auth-component");
3 if (!authComponent) return;
4
5 const isLoggedIn = await (
6 authComponent as { isAuthenticated: () => Promise<boolean> }
7 ).isAuthenticated();
8
9 if (isLoggedIn) {
10 window.location.href = "/classes";
11 } else {
12 (authComponent as { openAuthModal: () => void }).openAuthModal();
13 }
14});