Add reaction deck
This commit is contained in:
parent
db5c358f4f
commit
f1625fe101
24 changed files with 404 additions and 13 deletions
|
@ -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);
|
||||
|
|
13
app/javascript/mastodon/reducers/reaction_deck.js
Normal file
13
app/javascript/mastodon/reducers/reaction_deck.js
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue