49 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-11-04 00:27:28 +01:00
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import * as VueRouter from 'vue-router'
2023-11-04 00:27:28 +01:00
import App from './App.vue'
import './registerServiceWorker'
import './index.css'
2023-11-04 00:27:28 +01:00
2023-11-20 00:31:49 +01:00
import HomeView from '@/views/HomeView'
2023-11-08 01:19:52 +01:00
import LoginView from '@/views/LoginView'
import UserView from '@/views/UserView'
2023-11-08 23:52:28 +01:00
import MarketView from '@/views/MarketView'
2023-11-09 03:02:03 +01:00
import InvoiceView from '@/views/InvoiceView'
2023-11-26 22:07:56 +01:00
import UserHome from '@/components/UserHome'
import UserInvoices from '@/components/UserInvoices'
const routes = [
{
2023-11-20 00:31:49 +01:00
path: '/', component: HomeView
},
{
path: '/login', component: LoginView
2023-11-07 09:48:01 +01:00
},
{
2023-11-26 22:07:56 +01:00
path: '/user',
component: UserView,
children: [
2023-11-26 22:28:38 +01:00
{ path: 'settings', name: 'user', component: UserHome },
2023-11-26 22:07:56 +01:00
{ path: 'invoices', name: 'invoices', component: UserInvoices }
]
2023-11-08 23:52:28 +01:00
},
{
path: '/market/:id', component: MarketView
2023-11-09 03:02:03 +01:00
},
{
path: '/invoice/:id', component: InvoiceView
}
]
const router = VueRouter.createRouter({
history: VueRouter.createWebHashHistory(),
routes
})
const pinia = createPinia()
const app = createApp(App)
app.use(router)
app.use(pinia)
app.mount('#app')