mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-17 11:21:35 +03:00
b0514d6149
* add libraries for traslation purposes * Add button and service for language selection * add spanish translation on login page * add spanish translation on upload page * Add spanish translations for explore page * Add translations on user page * Add translations for config page * Add spanish translations on chat page * add translations for brain page * fix GUI and save on local storage * fix (i18n) init and types * fix (i18n): typos * add translation on new brain modal * add translations on metadata * Add translations on home page * fixes types * fix(frontend-tests): use get by id instead of text --------- Co-authored-by: Gustavo Maciel <gustavo_m13@outlook.com>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import PageHeading from "@/lib/components/ui/PageHeading";
|
|
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
|
|
import { ChatProvider } from "@/lib/context/ChatProvider";
|
|
|
|
import { ChatInput, ChatMessages } from "./components";
|
|
|
|
const SelectedChatPage = (): JSX.Element => {
|
|
const { currentBrain } = useBrainContext();
|
|
const { t } = useTranslation(['chat']);
|
|
|
|
return (
|
|
<main className="flex flex-col w-full pt-10" data-testid="chat-page">
|
|
<section className="flex flex-col flex-1 items-center w-full h-full min-h-[70vh]">
|
|
<PageHeading
|
|
title={t('title',{ brain: currentBrain?.name, ns: 'chat'})}
|
|
subtitle= {t('subtitle',{ ns: 'chat'})}
|
|
/>
|
|
<ChatProvider>
|
|
<div className="relative w-full flex flex-col flex-1 items-center">
|
|
<div className="flex-1 w-full flex flex-col items-center">
|
|
<ChatMessages />
|
|
</div>
|
|
<ChatInput />
|
|
</div>
|
|
</ChatProvider>
|
|
</section>
|
|
</main>
|
|
);
|
|
};
|
|
|
|
export default SelectedChatPage;
|