質問編集履歴

3

補足内容修正

2021/04/26 08:26

投稿

TMTN
TMTN

スコア53

test CHANGED
File without changes
test CHANGED
@@ -428,7 +428,7 @@
428
428
 
429
429
  ```
430
430
 
431
- <div class="profile-inner-name">{{ profileData }}</div>
431
+ <div class="profile-inner-name">{{ profileData.userName }}</div>
432
432
 
433
433
  ```
434
434
 

2

補足追加

2021/04/26 08:26

投稿

TMTN
TMTN

スコア53

test CHANGED
File without changes
test CHANGED
@@ -419,3 +419,61 @@
419
419
  <router-link to="`mypage/${profile.id}`" class="header-link neon3 flash">MYPAGE</router-link>
420
420
 
421
421
  ```
422
+
423
+
424
+
425
+ #補足
426
+
427
+
428
+
429
+ ```
430
+
431
+ <div class="profile-inner-name">{{ profileData }}</div>
432
+
433
+ ```
434
+
435
+
436
+
437
+ ```ここに言語を入力
438
+
439
+ export default {
440
+
441
+ data() {
442
+
443
+ return {
444
+
445
+ profileData: [],
446
+
447
+ };
448
+
449
+ created() {
450
+
451
+ const currentUser = firebase.auth().currentUser;
452
+
453
+
454
+
455
+ if (currentUser) {
456
+
457
+ firebase
458
+
459
+ .firestore()
460
+
461
+ .collection("users")
462
+
463
+ .doc(currentUser.uid)
464
+
465
+ .get()
466
+
467
+ .then((snapshot) => {
468
+
469
+ this.profileData.push(snapshot.data().userName);
470
+
471
+ console.log(this.profileData);
472
+
473
+ });
474
+
475
+ }
476
+
477
+ },
478
+
479
+ ```

1

内容追加

2021/04/26 08:24

投稿

TMTN
TMTN

スコア53

test CHANGED
File without changes
test CHANGED
@@ -172,6 +172,58 @@
172
172
 
173
173
 
174
174
 
175
+ #vueルーター
176
+
177
+
178
+
179
+ ```ここに言語を入力
180
+
181
+ import Vue from "vue";
182
+
183
+ import VueRouter from "vue-router";
184
+
185
+ import Signup from "../views/signup.vue";
186
+
187
+ import Mypage from "../views/mypage.vue";
188
+
189
+ import firebase from "firebase";
190
+
191
+
192
+
193
+ Vue.use(VueRouter);
194
+
195
+
196
+
197
+ const routes = [
198
+
199
+
200
+
201
+ {
202
+
203
+ path: "/signup",
204
+
205
+ name: "Signup",
206
+
207
+ component: Signup,
208
+
209
+ },
210
+
211
+ {
212
+
213
+ path: "/mypage/:id",
214
+
215
+ name: "Mypage",
216
+
217
+ component: Mypage,
218
+
219
+ meta: { requiresAuth: true },
220
+
221
+ },
222
+
223
+ ```
224
+
225
+
226
+
175
227
  #マイページ
176
228
 
177
229