This commit is contained in:
@ -1,17 +1,16 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router/router.ts'
|
||||
import {createPinia} from "pinia";
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
||||
import keycloakService from './services/keycloak';
|
||||
import {type AuthStore, useAuthStore} from "@/stores/authStore.ts";
|
||||
|
||||
import { createApp } from "vue";
|
||||
import App from "./App.vue";
|
||||
import router from "./router/router.ts";
|
||||
import { createPinia } from "pinia";
|
||||
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
|
||||
import keycloakService from "./services/keycloak";
|
||||
import { type AuthStore, useAuthStore } from "@/stores/authStore.ts";
|
||||
|
||||
let store: AuthStore;
|
||||
|
||||
keycloakService.CallInit(() => {
|
||||
try {
|
||||
const app = createApp(App)
|
||||
const app = createApp(App);
|
||||
|
||||
// Setup pinia store, allowing user to keep logged in status after refresh
|
||||
const pinia = createPinia();
|
||||
@ -19,19 +18,14 @@ keycloakService.CallInit(() => {
|
||||
app.use(pinia);
|
||||
store = useAuthStore();
|
||||
keycloakService.CallInitStore(store);
|
||||
app.use(router)
|
||||
app.use(router);
|
||||
|
||||
app.mount('#app');
|
||||
app.mount("#app");
|
||||
} catch (e) {
|
||||
console.error("Error while initiating Keycloak.")
|
||||
console.error(e)
|
||||
createApp(App).mount('#app');
|
||||
console.error("Error while initiating Keycloak.");
|
||||
console.error(e);
|
||||
createApp(App).mount("#app");
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export {store};
|
||||
export { store };
|
||||
|
Reference in New Issue
Block a user