fix(room): replace useMemo+categories with plain const to fix SWC parser error

This commit is contained in:
ZhenYi 2026-04-17 23:53:31 +08:00
parent 9246a9e6ab
commit aacd9572d1

View File

@ -95,12 +95,11 @@ export function MentionPopover({
// Keep refs in sync with state
mentionStateRef.current = mentionState;
const categories = useMemo<MentionSuggestion[]>(() => [
const categories: MentionSuggestion[] = [
{ type: 'category', category: 'repository', label: 'Repository', value: '@repository:' },
{ type: 'category', category: 'user', label: 'User', value: '@user:' },
{ type: 'category', category: 'ai', label: 'AI', value: '@ai:' },
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []); // intentionally static
];
const suggestions = useMemo((): MentionSuggestion[] => {
if (!mentionState) return [];