0
0
Fork 0

Code-split emoji-mart picker and data (#5175)

This commit is contained in:
Nolan Lawson 2017-10-01 22:22:24 -07:00 committed by Eugen Rochko
parent d841af4e80
commit b9c612b561
7 changed files with 348 additions and 10 deletions

View file

@ -1,6 +1,6 @@
import { List as ImmutableList } from 'immutable';
import { STORE_HYDRATE } from '../actions/store';
import { emojiIndex } from 'emoji-mart';
import { search as emojiSearch } from '../emoji_index_light';
import { buildCustomEmojis } from '../emoji';
const initialState = ImmutableList();
@ -8,7 +8,7 @@ const initialState = ImmutableList();
export default function custom_emojis(state = initialState, action) {
switch(action.type) {
case STORE_HYDRATE:
emojiIndex.search('', { custom: buildCustomEmojis(action.state.get('custom_emojis', [])) });
emojiSearch('', { custom: buildCustomEmojis(action.state.get('custom_emojis', [])) });
return action.state.get('custom_emojis');
default:
return state;