Skip to content

Commit

Permalink
サイドメニューをコンポーネント化しよう
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yoshiii committed Jul 13, 2022
1 parent 0b92d06 commit 4afb785
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/App.vue
Expand Up @@ -4,7 +4,6 @@
<!-- <router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link> -->
</nav>
<SideBar />
<router-view />
</div>
</template>
Expand All @@ -19,11 +18,10 @@
}
nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
text-align: left;
&.router-link-exact-active {
color: #42b983;
Expand All @@ -42,10 +40,7 @@ nav {
}
</style>
<script>
import SideBar from "@/components/layouts/SideBar";
export default {
components: {
SideBar,
},
components: {},
};
</script>
5 changes: 5 additions & 0 deletions src/views/ChatBoard.vue
@@ -1,5 +1,6 @@
<template>
<v-app id="inspire">
<SideBar />
<v-main>
<v-container class="py-8 px-6" fluid>
<v-row>
Expand Down Expand Up @@ -49,7 +50,11 @@

<script>
import firebase from "@/firebase/firebase";
import SideBar from "@/components/layouts/SideBar";
export default {
components: {
SideBar,
},
async created() {
this.user_id = this.$route.query.user_id;
const chatRef = firebase.firestore().collection("chats");
Expand Down
6 changes: 5 additions & 1 deletion src/views/UserList.vue
@@ -1,5 +1,6 @@
<template>
<v-app id="inspire">
<SideBar />
<v-app-bar app shrink-on-scroll>
<v-toolbar-title>ユーザー一覧</v-toolbar-title>
<v-spacer></v-spacer>
Expand All @@ -23,7 +24,10 @@
</template>

<script>
import SideBar from "@/components/layouts/SideBar";
export default {
//
components: {
SideBar,
},
};
</script>

0 comments on commit 4afb785

Please sign in to comment.