mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-10-26 15:18:16 +03:00
fix(frontend): next step impossible if no knowledge when creating brain if no onboarded (#2688)
# 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
faaf9b6dba
commit
b1684312eb
@ -124,11 +124,6 @@ export const BrainRecapStep = (): JSX.Element => {
|
||||
await feed();
|
||||
setIsBrainCreated(true);
|
||||
}}
|
||||
disabled={
|
||||
knowledgeToFeed.length === 0 &&
|
||||
!userIdentityData?.onboarded &&
|
||||
!openedConnections.length
|
||||
}
|
||||
isLoading={creating}
|
||||
important={true}
|
||||
/>
|
||||
|
@ -5,6 +5,7 @@ import { useFromConnectionsContext } from "@/app/chat/[chatId]/components/Action
|
||||
import { OpenedConnection } from "@/lib/api/sync/types";
|
||||
import { MessageInfoBox } from "@/lib/components/ui/MessageInfoBox/MessageInfoBox";
|
||||
import QuivrButton from "@/lib/components/ui/QuivrButton/QuivrButton";
|
||||
import { useKnowledgeToFeedContext } from "@/lib/context/KnowledgeToFeedProvider/hooks/useKnowledgeToFeedContext";
|
||||
import { createHandleGetButtonProps } from "@/lib/helpers/handleConnectionButtons";
|
||||
import { useUserData } from "@/lib/hooks/useUserData";
|
||||
|
||||
@ -25,6 +26,7 @@ export const FeedBrainStep = (): JSX.Element => {
|
||||
const [currentConnection, setCurrentConnection] = useState<
|
||||
OpenedConnection | undefined
|
||||
>(undefined);
|
||||
const { knowledgeToFeed } = useKnowledgeToFeedContext();
|
||||
|
||||
useEffect(() => {
|
||||
setCurrentConnection(
|
||||
@ -96,6 +98,11 @@ export const FeedBrainStep = (): JSX.Element => {
|
||||
iconName="chevronRight"
|
||||
onClick={goToNextStep}
|
||||
important={true}
|
||||
disabled={
|
||||
knowledgeToFeed.length === 0 &&
|
||||
!userIdentityData?.onboarded &&
|
||||
!openedConnections.length
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user