diff --git a/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/SettingsTab.tsx b/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/SettingsTab.tsx index 7110ac8b1..c47a6aa6d 100644 --- a/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/SettingsTab.tsx +++ b/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/SettingsTab.tsx @@ -88,7 +88,7 @@ export const SettingsTab = ({ brainId }: SettingsTabProps): JSX.Element => {
{isPublicBrain && !isOwnedByCurrentUser && ( - + {t("brain:public_brain_label")} )} diff --git a/frontend/app/brains-management/[brainId]/components/BrainsList/BrainsList.tsx b/frontend/app/brains-management/[brainId]/components/BrainsList/BrainsList.tsx index 8c49163d4..64232a10e 100644 --- a/frontend/app/brains-management/[brainId]/components/BrainsList/BrainsList.tsx +++ b/frontend/app/brains-management/[brainId]/components/BrainsList/BrainsList.tsx @@ -71,7 +71,7 @@ export const BrainsList = (): JSX.Element => { > @@ -83,7 +83,7 @@ export const BrainsList = (): JSX.Element => { > diff --git a/frontend/app/brains-management/library/components/PublicBrainItem/PublicBrainItem.tsx b/frontend/app/brains-management/library/components/PublicBrainItem/PublicBrainItem.tsx index f6c349fc8..9b2e4c789 100644 --- a/frontend/app/brains-management/library/components/PublicBrainItem/PublicBrainItem.tsx +++ b/frontend/app/brains-management/library/components/PublicBrainItem/PublicBrainItem.tsx @@ -36,7 +36,7 @@ export const PublicBrainItem = ({ }} disabled={isUserSubscribedToBrain || subscriptionRequestPending} isLoading={subscriptionRequestPending} - className="bg-purple-600 text-white p-0 px-3 rounded-xl border-0 w-content mt-3" + className="bg-primary text-white p-0 px-3 rounded-xl border-0 w-content mt-3" > {isUserSubscribedToBrain ? t("public_brain_already_subscribed_button_label") diff --git a/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx b/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx index 9b8fce147..07f7e3653 100644 --- a/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx +++ b/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx @@ -2,21 +2,16 @@ import { AnimatePresence, motion } from "framer-motion"; import { useTranslation } from "react-i18next"; import { AiOutlineLoading3Quarters } from "react-icons/ai"; +import { useKnowledgeToFeedContext } from "@/lib/context/KnowledgeToFeedProvider/hooks/useKnowledgeToFeedContext"; + import { ChatInput, KnowledgeToFeed } from "./components"; import { useActionBar } from "./hooks/useActionBar"; -type ActionBarProps = { - setShouldDisplayUploadCard: (shouldDisplay: boolean) => void; - shouldDisplayUploadCard: boolean; -}; - -export const ActionsBar = ({ - setShouldDisplayUploadCard, - shouldDisplayUploadCard, -}: ActionBarProps): JSX.Element => { +export const ActionsBar = (): JSX.Element => { const { hasPendingRequests, setHasPendingRequests } = useActionBar(); const { t } = useTranslation(["chat"]); + const { shouldDisplayFeedCard } = useKnowledgeToFeedContext(); return ( <> @@ -30,7 +25,7 @@ export const ActionsBar = ({ )}
- {shouldDisplayUploadCard && ( + {shouldDisplayFeedCard && (
setShouldDisplayUploadCard(false)} dispatchHasPendingRequests={() => setHasPendingRequests(true)} />
)} - {!shouldDisplayUploadCard && ( + {!shouldDisplayFeedCard && (
- +
)}
diff --git a/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/index.tsx b/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/index.tsx index 096179ba9..0c017bb1d 100644 --- a/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/index.tsx +++ b/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/index.tsx @@ -3,24 +3,25 @@ import { useTranslation } from "react-i18next"; import { PiPaperclipFill } from "react-icons/pi"; import Button from "@/lib/components/ui/Button"; +import { useKnowledgeToFeedContext } from "@/lib/context/KnowledgeToFeedProvider/hooks/useKnowledgeToFeedContext"; import { ChatBar } from "./components/ChatBar/ChatBar"; import { ConfigModal } from "./components/ConfigModal"; import { useChatInput } from "./hooks/useChatInput"; type ChatInputProps = { - shouldDisplayUploadCard: boolean; - setShouldDisplayUploadCard: (shouldDisplayUploadCard: boolean) => void; + shouldDisplayFeedCard: boolean; }; export const ChatInput = ({ - shouldDisplayUploadCard, - setShouldDisplayUploadCard, + shouldDisplayFeedCard, }: ChatInputProps): JSX.Element => { const { setMessage, submitQuestion, generatingAnswer, message } = useChatInput(); const { t } = useTranslation(["chat"]); + const { setShouldDisplayFeedCard } = useKnowledgeToFeedContext(); + return (
- {!shouldDisplayUploadCard && ( + {!shouldDisplayFeedCard && (