waffle/frontend/src/main.js
2022-05-06 01:55:21 +03:00

23 lines
No EOL
625 B
JavaScript

import Main from './components/Main.svelte';
import { getItem } from './storage';
import { authWithToken, useAuthHandlers } from './auth';
import { initResponsiveHandlers } from './responsive';
import { useDebuggingApi } from './debuggingapi';
useDebuggingApi();
initResponsiveHandlers();
useAuthHandlers();
authWithToken(getItem("auth:token"));
// Remove loading screen
const loadingElement = document.getElementById("pre--loading-screen");
if (loadingElement) {
loadingElement.parentElement.removeChild(loadingElement);
}
const app = new Main({
target: document.body
});
window.__waffle.app = app;
export default app;