feat: Add "Followers you know" widget to user profiles (#34652)
This commit is contained in:
parent
c9a554bdca
commit
b135a831ea
12 changed files with 213 additions and 17 deletions
|
@ -0,0 +1,19 @@
|
|||
import { createReducer } from '@reduxjs/toolkit';
|
||||
|
||||
import { fetchAccountsFamiliarFollowers } from '../actions/accounts_familiar_followers';
|
||||
|
||||
const initialState: Record<string, string[]> = {};
|
||||
|
||||
export const accountsFamiliarFollowersReducer = createReducer(
|
||||
initialState,
|
||||
(builder) => {
|
||||
builder.addCase(
|
||||
fetchAccountsFamiliarFollowers.fulfilled,
|
||||
(state, { payload }) => {
|
||||
if (payload) {
|
||||
state[payload.id] = payload.accountIds;
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
|
@ -4,6 +4,7 @@ import { loadingBarReducer } from 'react-redux-loading-bar';
|
|||
import { combineReducers } from 'redux-immutable';
|
||||
|
||||
import { accountsReducer } from './accounts';
|
||||
import { accountsFamiliarFollowersReducer } from './accounts_familiar_followers';
|
||||
import { accountsMapReducer } from './accounts_map';
|
||||
import { alertsReducer } from './alerts';
|
||||
import announcements from './announcements';
|
||||
|
@ -50,6 +51,7 @@ const reducers = {
|
|||
status_lists,
|
||||
accounts: accountsReducer,
|
||||
accounts_map: accountsMapReducer,
|
||||
accounts_familiar_followers: accountsFamiliarFollowersReducer,
|
||||
statuses,
|
||||
relationships: relationshipsReducer,
|
||||
settings,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue