mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
added router for redirect on home and add router for profile page
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div class="header__nav">
|
||||
<nav>
|
||||
<a href="#" class="header__nav--now">Главная</a>
|
||||
<a href="#" @click="$router.push({ name: 'home' })" class="header__nav--now">Главная</a>
|
||||
<a href="#">Профиль</a>
|
||||
<a href="#">Помощь</a>
|
||||
</nav>
|
||||
|
||||
11
luckydiamond/src/pages/ProfilePage.vue
Normal file
11
luckydiamond/src/pages/ProfilePage.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div class="content__grid-profile">
|
||||
<h1>profile</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -1,9 +1,12 @@
|
||||
import { createRouter, createWebHistory } from "vue-router";
|
||||
|
||||
import HomePage from "../pages/HomePage.vue";
|
||||
import ProfilePage from "@/pages/ProfilePage.vue";
|
||||
|
||||
export default createRouter({
|
||||
history: createWebHistory(),
|
||||
routes: [
|
||||
{ path: '/', component: HomePage, name: 'home' }
|
||||
{ path: '/', component: HomePage, name: 'home' },
|
||||
{ path: '/', component: ProfilePage, name: 'profile' }
|
||||
]
|
||||
})
|
||||
Reference in New Issue
Block a user