brutalism design
This commit is contained in:
@@ -2,6 +2,7 @@ import { useAuth } from '@shared/composables/use-auth'
|
||||
import { createApp } from 'vue'
|
||||
import App from '../App.vue'
|
||||
import routerPlugin, { router } from '../plugins/router'
|
||||
import tanstackQueryPlugin from '../plugins/tanstack-query'
|
||||
|
||||
const mountPoint = '#app'
|
||||
|
||||
@@ -14,8 +15,14 @@ export default async function () {
|
||||
await router.isReady()
|
||||
|
||||
if (!authorized.value && router.currentRoute.value.meta.auth === undefined) {
|
||||
router.push('/auth/login')
|
||||
await router.push({ name: '/auth/login', replace: true })
|
||||
}
|
||||
|
||||
if (authorized.value && router.currentRoute.value.meta.auth === 'guest') {
|
||||
await router.push({ name: '/', replace: true })
|
||||
}
|
||||
|
||||
app.use(tanstackQueryPlugin)
|
||||
|
||||
app.mount(mountPoint)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user