forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
31 lines (24 loc) · 648 Bytes
/
main.js
File metadata and controls
31 lines (24 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { createApp } from 'vue'
import piniaPersist from 'pinia-plugin-persist'
import App from './App.vue'
import router from './router'
import { createPiniaSingleton } from './shared/create-pinia-singleton'
const app = createApp(App, {})
// Initialize store (Pinia)
const pinia = createPiniaSingleton()
pinia.use(piniaPersist)
app.use(pinia)
// Initialize router
router.beforeEach((to, from) => {
// Route Flags
// -> Remove Left Menu
if (to.meta.hideLeftMenu) {
const leftMenuRef = document.querySelector('.leftmenu')
if (leftMenuRef) {
leftMenuRef.remove()
}
}
})
app.use(router)
// Mount App
app.mount('#app')