[Glitch] Add categories for custom emojis

Port front-end changes from e64e6a03dd to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
Eugen Rochko
2019-06-28 15:54:10 +02:00
committed by Thibaut Girka
parent 4d964398de
commit 662252c8f7
2 changed files with 19 additions and 14 deletions

View File

@ -93,8 +93,11 @@ export const buildCustomEmojis = (customEmojis) => {
keywords: [name],
imageUrl: url,
custom: true,
customCategory: emoji.get('category'),
});
});
return emojis;
};
export const categoriesFromEmojis = customEmojis => customEmojis.reduce((set, emoji) => set.add(emoji.get('category') ? `custom-${emoji.get('category')}` : 'custom'), new Set());