Use state object for user view instead of timeline.

Also fetch user if not in the state already.
This commit is contained in:
eal 2017-11-14 18:08:03 +02:00
parent 55c4818084
commit 07057043d9
4 changed files with 21 additions and 2 deletions

View file

@ -22,6 +22,10 @@ const backendInteractorService = (credentials) => {
return apiService.fetchAllFollowing({username, credentials})
}
const fetchUser = ({id}) => {
return apiService.fetchUser({id, credentials})
}
const followUser = (id) => {
return apiService.followUser({credentials, id})
}
@ -65,6 +69,7 @@ const backendInteractorService = (credentials) => {
unfollowUser,
blockUser,
unblockUser,
fetchUser,
fetchAllFollowing,
verifyCredentials: apiService.verifyCredentials,
startFetching,