use reusable List vue component instead of withList hoc

Using slot is the preferred way in vue
This commit is contained in:
taehoon 2019-04-03 22:17:42 -04:00
parent 4b292564d8
commit 1cec2b6969
3 changed files with 49 additions and 20 deletions

View file

@ -200,9 +200,12 @@
<BlockCard slot-scope="row" :userId="row.item"/>
</Autosuggest>
</div>
<block-list :refresh="true">
<BlockList :refresh="true">
<template slot="item" scope="p">
<BlockCard :key="p.item" :userId="p.item" />
</template>
<template slot="empty">{{$t('settings.no_blocks')}}</template>
</block-list>
</BlockList>
</div>
<div :label="$t('settings.mutes_tab')">
@ -211,9 +214,12 @@
<MuteCard slot-scope="row" :userId="row.item"/>
</Autosuggest>
</div>
<mute-list :refresh="true">
<MuteList :refresh="true">
<template slot="item" scope="p">
<MuteCard :key="p.item" :userId="p.item" />
</template>
<template slot="empty">{{$t('settings.no_mutes')}}</template>
</mute-list>
</MuteList>
</div>
</tab-switcher>
</div>