fix(room): replace useMemo+categories with plain const to fix SWC parser error
This commit is contained in:
parent
9246a9e6ab
commit
aacd9572d1
@ -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 [];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user