Add reaction deck

This commit is contained in:
KMY 2023-05-26 15:15:48 +09:00
parent db5c358f4f
commit f1625fe101
24 changed files with 404 additions and 13 deletions

View file

@ -34,6 +34,7 @@ import notifications from './notifications';
import picture_in_picture from './picture_in_picture';
import polls from './polls';
import push_notifications from './push_notifications';
import reaction_deck from './reaction_deck';
import relationships from './relationships';
import search from './search';
import server from './server';
@ -92,6 +93,7 @@ const reducers = {
history,
tags,
followed_tags,
reaction_deck,
};
const rootReducer = combineReducers(reducers);

View file

@ -0,0 +1,13 @@
import { List as ImmutableList, fromJS as ConvertToImmutable } from 'immutable';
import { REACTION_DECK_FETCH_SUCCESS, REACTION_DECK_UPDATE_SUCCESS } from '../actions/reaction_deck';
const initialState = ImmutableList([]);
export default function reaction_deck(state = initialState, action) {
if(action.type === REACTION_DECK_FETCH_SUCCESS || action.type === REACTION_DECK_UPDATE_SUCCESS) {
state = ConvertToImmutable(action.emojis);
}
return state;
}