File tree Expand file tree Collapse file tree 3 files changed +43
-1
lines changed
Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 1+ <template >
2+ <section class =" hero is-info" v-show =" show" >
3+ <div class =" hero-body" >
4+ <div class =" has-text-centered" >
5+ <p class =" title" >
6+ {{ title }}
7+ </p >
8+ </div >
9+ </div >
10+ </section >
11+ </template >
12+
13+ <script >
14+ export default {
15+ name: ' NoContent' ,
16+
17+ props: {
18+ title: {
19+ default: ' No content :)' ,
20+ type: String
21+ },
22+
23+ show: {
24+ type: Boolean ,
25+ required: true
26+ }
27+ }
28+ };
29+ </script >
30+
31+ <style scoped>
32+
33+ </style >
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+
1719 <TweetPreviewList :tweets =" tweets" />
1820
1921 <b-modal :active.sync =" isNewTweetModalActive" has-modal-card >
2527<script >
2628import { mapGetters , mapActions } from ' vuex' ;
2729import TweetPreviewList from ' ../../common/TweetPreviewList.vue' ;
30+ import NoContent from ' ../../common/NoContent.vue' ;
2831import NewTweetForm from ' ./NewTweetForm.vue' ;
2932
3033export default {
@@ -33,6 +36,7 @@ export default {
3336 components: {
3437 TweetPreviewList,
3538 NewTweetForm,
39+ NoContent
3640 },
3741
3842 data : () => ({
Original file line number Diff line number Diff line change 11<template >
2- <TweetPreviewList :tweets =" tweets" />
2+ <div class =" user-container" >
3+ <TweetPreviewList :tweets =" tweets" />
4+ <NoContent :show =" !tweets.length" title =" No tweets yet :)" />
5+ </div >
36</template >
47
58<script >
69import { mapActions } from ' vuex' ;
710import TweetPreviewList from ' @/components/common/TweetPreviewList.vue' ;
11+ import NoContent from ' @/components/common/NoContent.vue' ;
812
913export default {
1014 name: ' UserContainer' ,
1115
1216 components: {
1317 TweetPreviewList,
18+ NoContent
1419 },
1520
1621 data : () => ({
You can’t perform that action at this time.
0 commit comments