fileserver/frontend/src/main.ts

15 lines
298 B
TypeScript
Raw Normal View History

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;