simplify <List> API and move logic outside of it

This commit is contained in:
Henry Jameson 2026-06-08 05:27:47 +03:00
commit a0d5decc49
15 changed files with 209 additions and 510 deletions

View file

@ -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