waffle/frontend/src/main.js
2022-05-05 16:31:10 +03:00

27 lines
No EOL
611 B
JavaScript

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