Skip to content

Commit

Permalink
feat: configure routes
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmatw committed Feb 24, 2020
1 parent 8ee8927 commit 9725c64
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 16 deletions.
5 changes: 5 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion client/package.json
Expand Up @@ -9,7 +9,8 @@
},
"dependencies": {
"core-js": "^3.4.4",
"vue": "^2.6.10"
"vue": "^2.6.10",
"vue-router": "^3.1.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
Expand Down
16 changes: 1 addition & 15 deletions client/src/App.vue
@@ -1,23 +1,9 @@
<template>
<div id="app">
<SMain />
<router-view />
</div>
</template>

<script>
//import Main from './components/Home/Main.vue'
//import LMain from './components/Login/LMain.vue'
import SMain from './components/Signup/SMain.vue'
//import GHMain from "./components/GetHired/GHMain.vue";
export default {
name: "app",
components: {
SMain
}
};
</script>

<style>
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
Expand Down
19 changes: 19 additions & 0 deletions client/src/main.js
@@ -1,8 +1,27 @@
import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import Home from './components/Home/Main.vue'
import GetHired from './components/GetHired/GHMain.vue'
import Signup from './components/Signup/SMain.vue'
import Login from './components/Login/LMain.vue'

Vue.config.productionTip = false
Vue.use(VueRouter)

const routes = [
{path: '/', component: Home },
{path: '/gethired', component: GetHired },
{path: '/signup', component: Signup },
{path: '/login', component: Login }
]

const router = new VueRouter({
mode: 'history',
routes
})

new Vue({
router,
render: h => h(App),
}).$mount('#app')

0 comments on commit 9725c64

Please sign in to comment.