diff options
| author | Fuwn <[email protected]> | 2021-05-06 20:20:37 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-06 20:20:37 -0700 |
| commit | df12123946bbfa0515cb3338f112b931a1bff3c1 (patch) | |
| tree | a41f897af916417a9b040b599252d4e23a16d658 /src/router/index.ts | |
| parent | Initial commit (diff) | |
| download | frontend-df12123946bbfa0515cb3338f112b931a1bff3c1.tar.xz frontend-df12123946bbfa0515cb3338f112b931a1bff3c1.zip | |
feat(global): :star:
Diffstat (limited to 'src/router/index.ts')
| -rw-r--r-- | src/router/index.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/router/index.ts b/src/router/index.ts new file mode 100644 index 0000000..c0fabee --- /dev/null +++ b/src/router/index.ts @@ -0,0 +1,27 @@ +import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'; +import Home from '../views/Home.vue'; + +const routes: Array<RouteRecordRaw> = [ + { + path: '/', + name: 'Home', + component: Home, + }, + { + path: '/language/:lang', + name: 'Language', + component: () => import('../views/Language.vue'), + }, + { + path: '/languages', + name: 'languages', + component: () => import('../views/Languages.vue'), + }, +]; + +const router = createRouter({ + history: createWebHistory(process.env.BASE_URL), + routes, +}); + +export default router; |