diff --git a/memento-note/components/note-inline-editor.tsx b/memento-note/components/note-inline-editor.tsx index c6495c7..b15d281 100644 --- a/memento-note/components/note-inline-editor.tsx +++ b/memento-note/components/note-inline-editor.tsx @@ -100,8 +100,9 @@ export function NoteInlineEditor({ useEffect(() => { if (session?.user?.id) { + const userId = session.user.id import('@/app/actions/ai-settings').then(({ getAISettings }) => { - getAISettings(session.user.id).then(settings => { + getAISettings(userId).then(settings => { setAiAssistantEnabled(settings.paragraphRefactor !== false) setAutoLabelingEnabled(settings.autoLabeling !== false) }).catch(err => console.error("Failed to fetch AI settings", err)) diff --git a/memento-note/components/note-input.tsx b/memento-note/components/note-input.tsx index 80c59bb..7f66727 100644 --- a/memento-note/components/note-input.tsx +++ b/memento-note/components/note-input.tsx @@ -88,8 +88,9 @@ export function NoteInput({ useEffect(() => { if (session?.user?.id) { + const userId = session.user.id import('@/app/actions/ai-settings').then(({ getAISettings }) => { - getAISettings(session.user.id).then(settings => { + getAISettings(userId).then(settings => { setAiAssistantEnabled(settings.paragraphRefactor !== false) setAutoLabelingEnabled(settings.autoLabeling !== false) }).catch(err => console.error("Failed to fetch AI settings", err))