15 lines
298 B
TypeScript
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;
|