File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
frontend/src/components/view Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1414 </b-button >
1515 </div >
1616
17- <NoContent :show =" !tweets.length" title =" No tweets yet :)" />
18-
1917 <TweetPreviewList :tweets =" tweets" />
2018
2119 <b-modal :active.sync =" isNewTweetModalActive" has-modal-card >
2725<script >
2826import { mapGetters , mapActions } from ' vuex' ;
2927import TweetPreviewList from ' ../../common/TweetPreviewList.vue' ;
30- import NoContent from ' ../../common/NoContent.vue' ;
3128import NewTweetForm from ' ./NewTweetForm.vue' ;
3229import { pusher } from ' @/services/Pusher' ;
3330import { SET_TWEET } from ' @/store/modules/tweet/mutationTypes' ;
@@ -41,7 +38,6 @@ export default {
4138 components: {
4239 TweetPreviewList,
4340 NewTweetForm,
44- NoContent
4541 },
4642
4743 data : () => ({
Original file line number Diff line number Diff line change 11<template >
22 <div class =" user-container" >
33 <TweetPreviewList :tweets =" tweets" />
4- <NoContent :show =" !tweets.length " title =" No tweets yet :)" />
4+ <NoContent :show =" noContent " title =" No tweets yet :)" />
55 </div >
66</template >
77
@@ -20,11 +20,16 @@ export default {
2020
2121 data : () => ({
2222 tweets: [],
23+ noContent: false
2324 }),
2425
2526 async created () {
2627 try {
2728 this .tweets = await this .fetchTweetsByUserId (this .$route .params .id );
29+
30+ if (! this .tweets .length ) {
31+ this .noContent = true ;
32+ }
2833 } catch (error) {
2934 console .error (error .message );
3035 }
You can’t perform that action at this time.
0 commit comments