mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-15 18:25:18 +02:00
Merge pull request #1038 from JoeMakuta/fix/narrow-effect-use-lazy-state-init-add-memo
fix : narrow effect, use lazy state init and add memo
This commit is contained in:
commit
25b068f420
7 changed files with 17 additions and 23 deletions
|
|
@ -38,7 +38,7 @@ export function PromptConfigManager({ searchSpaceId }: PromptConfigManagerProps)
|
|||
if (searchSpace) {
|
||||
setCustomInstructions(searchSpace.qna_custom_instructions || "");
|
||||
}
|
||||
}, [searchSpace]);
|
||||
}, [searchSpace?.qna_custom_instructions]);
|
||||
|
||||
// Derive hasChanges during render
|
||||
const hasChanges = !!searchSpace && (searchSpace.qna_custom_instructions || "") !== customInstructions;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue