fix: Add empty state in Selling

This commit is contained in:
Faris Ansari 2018-08-27 19:57:12 +05:30
parent 725603c0a9
commit a4dcb6f548
2 changed files with 7 additions and 5 deletions

View File

@ -19,7 +19,7 @@
</item-list-card> </item-list-card>
</div> </div>
</div> </div>
<empty-state v-else message="This page keeps track of items you want to buy from sellers." :centered="false" /> <empty-state v-else :message="__('This page keeps track of items you want to buy from sellers.')" :centered="false" />
</div> </div>
</template> </template>
<script> <script>

View File

@ -3,7 +3,7 @@
<section-header> <section-header>
<h4>{{ __('Selling') }}</h4> <h4>{{ __('Selling') }}</h4>
</section-header> </section-header>
<div class="row"> <div class="row" v-if="items">
<div class="col-md-7" <div class="col-md-7"
style="margin-bottom: 30px;" style="margin-bottom: 30px;"
v-for="item of items" v-for="item of items"
@ -32,27 +32,29 @@
</div> </div>
</div> </div>
</div> </div>
<empty-state v-else :message="__('This page keeps track of your items in which buyers have showed some interest.')" :centered="false" />
</div> </div>
</template> </template>
<script> <script>
import EmptyState from '../components/EmptyState.vue';
import SectionHeader from '../components/SectionHeader.vue'; import SectionHeader from '../components/SectionHeader.vue';
import ItemListCard from '../components/ItemListCard.vue'; import ItemListCard from '../components/ItemListCard.vue';
export default { export default {
components: { components: {
SectionHeader, SectionHeader,
ItemListCard ItemListCard,
EmptyState
}, },
data() { data() {
return { return {
items: [] items: null
} }
}, },
created() { created() {
this.get_items_for_messages() this.get_items_for_messages()
.then(items => { .then(items => {
this.items = items; this.items = items;
console.log(items);
}); });
}, },
methods: { methods: {