mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
refactor: use destructuring pattern for community prompts atom
This commit is contained in:
parent
8727acb5ad
commit
3c514756c7
2 changed files with 2 additions and 6 deletions
|
|
@ -22,9 +22,7 @@ interface SetupPromptStepProps {
|
|||
}
|
||||
|
||||
export function SetupPromptStep({ searchSpaceId, onComplete }: SetupPromptStepProps) {
|
||||
const communityPromptsQuery = useAtomValue(communityPromptsAtom);
|
||||
const prompts = communityPromptsQuery.data || [];
|
||||
const loadingPrompts = communityPromptsQuery.isPending;
|
||||
const { data: prompts = [], isPending: loadingPrompts } = useAtomValue(communityPromptsAtom);
|
||||
const [enableCitations, setEnableCitations] = useState(true);
|
||||
const [customInstructions, setCustomInstructions] = useState("");
|
||||
const [saving, setSaving] = useState(false);
|
||||
|
|
|
|||
|
|
@ -40,9 +40,7 @@ export function PromptConfigManager({ searchSpaceId }: PromptConfigManagerProps)
|
|||
queryFn: () => searchSpacesApiService.getSearchSpace({ id: searchSpaceId }),
|
||||
enabled: !!searchSpaceId,
|
||||
});
|
||||
const communityPromptsQuery = useAtomValue(communityPromptsAtom);
|
||||
const prompts = communityPromptsQuery.data || [];
|
||||
const loadingPrompts = communityPromptsQuery.isPending;
|
||||
const { data: prompts = [], isPending: loadingPrompts } = useAtomValue(communityPromptsAtom);
|
||||
|
||||
const [enableCitations, setEnableCitations] = useState(true);
|
||||
const [customInstructions, setCustomInstructions] = useState("");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue