fix: correct emoji category group IDs to match Unicode CLDR

Fix category filtering by using correct emojibase group IDs:
- Groups are 0-9, not 0-7
- Skip group 2 (Component - skin tone modifiers)
- Match Unicode CLDR standard group ordering
- Group 0: Smileys & Emotion (not Smileys & People)
- Group 1: People & Body (separate from smileys)
- Groups 3-9: Animals, Food, Travel, Activities, Objects, Symbols, Flags

Categories now correctly filter the right emojis.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock
2025-09-29 18:10:46 -05:00
parent 616a50e234
commit b2a21b79ad

View File

@@ -27,16 +27,17 @@ interface EmojiPickerProps {
playerNumber: 1 | 2 | 3 | 4
}
// Emoji group categories from emojibase
// Emoji group categories from emojibase (matching Unicode CLDR group IDs)
const EMOJI_GROUPS = {
0: { name: 'Smileys & People', icon: '😀' },
1: { name: 'Animals & Nature', icon: '🐶' },
2: { name: 'Food & Drink', icon: '🍎' },
3: { name: 'Activities', icon: '' },
4: { name: 'Travel & Places', icon: '🚗' },
5: { name: 'Objects', icon: '💡' },
6: { name: 'Symbols', icon: '❤️' },
7: { name: 'Flags', icon: '🏁' }
0: { name: 'Smileys & Emotion', icon: '😀' },
1: { name: 'People & Body', icon: '👤' },
3: { name: 'Animals & Nature', icon: '🐶' },
4: { name: 'Food & Drink', icon: '🍎' },
5: { name: 'Travel & Places', icon: '🚗' },
6: { name: 'Activities', icon: '' },
7: { name: 'Objects', icon: '💡' },
8: { name: 'Symbols', icon: '❤️' },
9: { name: 'Flags', icon: '🏁' }
} as const
// Create a map of emoji to their searchable data and group