Skip to content

Commit

Permalink
feat: activate step3
Browse files Browse the repository at this point in the history
  • Loading branch information
mamadoudicko committed Oct 4, 2023
1 parent defd0c2 commit b3f0367
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ActionsBar = (): JSX.Element => {
return (
<>
{hasPendingRequests && (
<div className="flex mt-1 flex-col md:flex-row w-full shadow-md dark:shadow-primary/25 hover:shadow-xl transition-shadow rounded-xl bg-white dark:bg-black border border-black/10 dark:border-white/25 p-2 md:p-6 pl-6">
<div className="flex mt-1 flex-col md:flex-row w-full shadow-md dark:shadow-primary/25 hover:shadow-xl transition-shadow rounded-xl bg-white dark:bg-black border border-black/10 dark:border-white/25 p-2 md:p-6 pl-6 mb-3">
<div className="flex flex-1 items-center mb-2 md:mb-0">
<span className="text-sm md:text-1xl">{t("feedingBrain")}</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*eslint max-lines: ["error", 200 ]*/

import { UUID } from "crypto";
import { useParams, useRouter } from "next/navigation";
import { useState } from "react";
Expand All @@ -10,6 +12,7 @@ import { useChatContext } from "@/lib/context";
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
import { useKnowledgeToFeedContext } from "@/lib/context/KnowledgeToFeedProvider/hooks/useKnowledgeToFeedContext";
import { useToast } from "@/lib/hooks";
import { useOnboardingContext } from "@/lib/hooks/useOnboardingContext";

import { FeedItemCrawlType, FeedItemUploadType } from "../../../types";

Expand All @@ -23,7 +26,7 @@ export const useFeedBrainInChat = ({
const { t } = useTranslation(["upload"]);
const router = useRouter();
const { setShouldDisplayFeedCard } = useKnowledgeToFeedContext();

const { setCurrentStep } = useOnboardingContext();
const { currentBrainId } = useBrainContext();
const { setKnowledgeToFeed, knowledgeToFeed } = useKnowledgeToFeedContext();
const [hasPendingRequests, setHasPendingRequests] = useState(false);
Expand Down Expand Up @@ -61,6 +64,7 @@ export const useFeedBrainInChat = ({
return;
}
try {
setCurrentStep("UPLOADED");
dispatchHasPendingRequests();
setShouldDisplayFeedCard(false);
setHasPendingRequests(true);
Expand Down

0 comments on commit b3f0367

Please sign in to comment.