Add withList hoc and remove UserList component
This commit is contained in:
parent
a817cc7cb4
commit
94e6de11b7
4 changed files with 30 additions and 22 deletions
|
@ -1,10 +0,0 @@
|
|||
import BasicUserCard from '../basic_user_card/basic_user_card.vue'
|
||||
|
||||
const UserList = {
|
||||
props: ['entries'],
|
||||
components: {
|
||||
BasicUserCard
|
||||
}
|
||||
}
|
||||
|
||||
export default UserList
|
|
@ -1,11 +0,0 @@
|
|||
<template functional>
|
||||
<div class="user-list">
|
||||
<basic-user-card
|
||||
v-for="entry in entries"
|
||||
:key="entry.id"
|
||||
:user="entry"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="./user_list.js"></script>
|
|
@ -5,9 +5,11 @@ import TabSwitcher from '../tab_switcher/tab_switcher.js'
|
|||
import ImageCropper from '../image_cropper/image_cropper.vue'
|
||||
import StyleSwitcher from '../style_switcher/style_switcher.vue'
|
||||
import fileSizeFormatService from '../../services/file_size_format/file_size_format.js'
|
||||
import UserList from '../user_list/user_list.vue'
|
||||
import BasicUserCard from '../basic_user_card/basic_user_card.vue'
|
||||
import withLoadMore from '../../hocs/with_load_more/with_load_more'
|
||||
import withList from '../../hocs/with_list/with_list'
|
||||
|
||||
const UserList = withList(BasicUserCard, entry => ({ user: entry }))
|
||||
const BlockListWithLoadMore = withLoadMore(
|
||||
UserList,
|
||||
(props, $store) => $store.dispatch('fetchBlocks'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue