fileserver/frontend/src/main.ts
Mutzi c8b2ae30c8
All checks were successful
/ Build the server (push) Successful in 3m5s
Implemented routing instead of internal state
2023-10-24 12:50:04 +02:00

15 lines
298 B
TypeScript

import "./app.pcss";
import App from "./App.svelte";
import {token} from './store';
import {replace} from 'svelte-spa-router';
token.subscribe(v => {
if (v == null) replace('/login').then()
});
const app = new App({
target: document.getElementById("app") as any,
});
export default app;