simplify <List> API and move logic outside of it
This commit is contained in:
parent
503309890f
commit
a0d5decc49
15 changed files with 209 additions and 510 deletions
|
|
@ -40,9 +40,11 @@
|
|||
:disabled="!user.friends_count"
|
||||
>
|
||||
<List
|
||||
:user-id="userId"
|
||||
:items-function="getFriends"
|
||||
:fetch-function="() => $store.dispatch('fetchFriends', userId)"
|
||||
:items="friends"
|
||||
:loading="friendsLoading"
|
||||
:error="friendsError"
|
||||
:bottomed-out="friendsBottomedOut"
|
||||
@fetch-requested="fetchUsers('friends')"
|
||||
>
|
||||
<template #item="{item}">
|
||||
<FollowCard :user="item" />
|
||||
|
|
@ -57,9 +59,11 @@
|
|||
:disabled="!user.followers_count"
|
||||
>
|
||||
<List
|
||||
:user-id="userId"
|
||||
:items-function="getFollowers"
|
||||
:fetch-function="() => $store.dispatch('fetchFollowers', userId)"
|
||||
:items="followers"
|
||||
:loading="followersLoading"
|
||||
:error="followersError"
|
||||
:bottomed-out="followersBottomedOut"
|
||||
@fetch-requested="fetchUsers('followers')"
|
||||
>
|
||||
<template #item="{item}">
|
||||
<FollowCard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue