mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-08-17 02:10:31 +03:00
fix(frontend): add brain modal integration doestn t work (#2649)
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
This commit is contained in:
parent
11a2e888da
commit
ca6c0a86dc
@ -23,8 +23,7 @@ export const BrainRecapStep = (): JSX.Element => {
|
||||
const { createBrain } = useBrainCreationApi();
|
||||
const { updateUserIdentity } = useUserApi();
|
||||
const { userIdentityData } = useUserData();
|
||||
const { openedConnections, setOpenedConnections } =
|
||||
useFromConnectionsContext();
|
||||
const { openedConnections } = useFromConnectionsContext();
|
||||
|
||||
const feed = async (): Promise<void> => {
|
||||
if (!userIdentityData?.onboarded) {
|
||||
@ -121,7 +120,6 @@ export const BrainRecapStep = (): JSX.Element => {
|
||||
iconName="add"
|
||||
onClick={async () => {
|
||||
await feed();
|
||||
setOpenedConnections([]);
|
||||
}}
|
||||
disabled={
|
||||
knowledgeToFeed.length === 0 && !userIdentityData?.onboarded
|
||||
|
@ -30,6 +30,7 @@ export const useBrainCreationApi = () => {
|
||||
const { crawlWebsiteHandler, uploadFileHandler } = useKnowledgeToFeedInput();
|
||||
const { setIsBrainCreationModalOpened, setCreating, currentSelectedBrain } =
|
||||
useBrainCreationContext();
|
||||
const { setOpenedConnections } = useFromConnectionsContext();
|
||||
const [fields, setFields] = useState<
|
||||
{ name: string; type: string; value: string }[]
|
||||
>([]);
|
||||
@ -88,6 +89,7 @@ export const useBrainCreationApi = () => {
|
||||
setCurrentBrainId(createdBrainId);
|
||||
setIsBrainCreationModalOpened(false);
|
||||
setCreating(false);
|
||||
setOpenedConnections([]);
|
||||
reset();
|
||||
|
||||
void queryClient.invalidateQueries({
|
||||
|
Loading…
Reference in New Issue
Block a user