diff --git a/src/components/EmojiPicker.tsx b/src/components/EmojiPicker.tsx index 01e4b546..a328a7ff 100644 --- a/src/components/EmojiPicker.tsx +++ b/src/components/EmojiPicker.tsx @@ -1,5 +1,5 @@ import { useState, useRef, useEffect, useCallback } from 'react' -import { EMOJI_GROUPS, EMOJIS_BY_GROUP, GROUP_ICONS, GROUP_SHORT_LABELS, searchEmojis } from '../utils/emoji' +import { EMOJI_GROUPS, EMOJIS_BY_GROUP, GROUP_SHORT_LABELS, searchEmojis } from '../utils/emoji' interface EmojiPickerProps { onSelect: (emoji: string) => void @@ -11,7 +11,6 @@ export function EmojiPicker({ onSelect, onClose }: EmojiPickerProps) { const inputRef = useRef(null) const containerRef = useRef(null) const scrollRef = useRef(null) - const groupRefs = useRef>(new Map()) useEffect(() => { setTimeout(() => inputRef.current?.focus(), 50) @@ -45,13 +44,6 @@ export function EmojiPicker({ onSelect, onClose }: EmojiPickerProps) { onClose() }, [onSelect, onClose]) - const scrollToGroup = useCallback((group: string) => { - const el = groupRefs.current.get(group) - if (el && scrollRef.current) { - el.scrollIntoView({ behavior: 'smooth', block: 'start' }) - } - }, []) - const searchResults = search.trim() ? searchEmojis(search) : null const isSearching = searchResults !== null @@ -73,20 +65,6 @@ export function EmojiPicker({ onSelect, onClose }: EmojiPickerProps) { data-testid="emoji-picker-search" /> - {!isSearching && ( -
- {EMOJI_GROUPS.map(group => ( - - ))} -
- )}
{isSearching ? ( searchResults.length > 0 ? ( @@ -113,10 +91,7 @@ export function EmojiPicker({ onSelect, onClose }: EmojiPickerProps) { const emojis = EMOJIS_BY_GROUP.get(group) if (!emojis?.length) return null return ( -
{ if (el) groupRefs.current.set(group, el) }} - > +
{GROUP_SHORT_LABELS[group]}