Implemented basic Vue.js frontend (#222)
Co-authored-by: Adam Bem <adam.bem@zoho.eu> Co-authored-by: widlam <mikolaj.widla@gmail.com> Reviewed-on: #222 Reviewed-by: Mikolaj Widla <widlam@noreply.example.com>
This commit is contained in:
		
							
								
								
									
										38
									
								
								Frontend/src/router/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								Frontend/src/router/index.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
import { createRouter, createWebHistory } from 'vue-router'
 | 
			
		||||
 | 
			
		||||
const landingPage = import("@views/LandingView.vue")
 | 
			
		||||
const xmlTool = import("@views/XmlToolView.vue")
 | 
			
		||||
const restMock = import("@views/RestMockView.vue")
 | 
			
		||||
const formatter = import("@views/FormatterView.vue")
 | 
			
		||||
 | 
			
		||||
const routes = [
 | 
			
		||||
  {
 | 
			
		||||
    path: '/',
 | 
			
		||||
    name: 'landing',
 | 
			
		||||
    component: () => landingPage
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    path: '/xml',
 | 
			
		||||
    name: 'xmltool',
 | 
			
		||||
    component: () => xmlTool
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    path: '/restmock',
 | 
			
		||||
    name: 'restmock',
 | 
			
		||||
    component: () => restMock
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    path: '/formatter',
 | 
			
		||||
    name: 'formatter',
 | 
			
		||||
    component: () => formatter
 | 
			
		||||
  },
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
const router = createRouter({
 | 
			
		||||
  history: createWebHistory(import.meta.env.BASE_URL),
 | 
			
		||||
  routes: routes
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export default router;
 | 
			
		||||
		Reference in New Issue
	
	Block a user