2023-10-20 11:02:21 +00:00
|
|
|
import "./app.pcss";
|
|
|
|
import App from "./App.svelte";
|
2023-10-24 10:50:04 +00:00
|
|
|
import {token} from './store';
|
|
|
|
import {replace} from 'svelte-spa-router';
|
2023-10-20 11:02:21 +00:00
|
|
|
|
|
|
|
token.subscribe(v => {
|
2023-10-24 10:50:04 +00:00
|
|
|
if (v == null) replace('/login').then()
|
2023-10-20 11:02:21 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
const app = new App({
|
|
|
|
target: document.getElementById("app") as any,
|
|
|
|
});
|
|
|
|
|
|
|
|
export default app;
|