quivr/frontend/app/brains-management/[brainId]/page.tsx
Mamadou DICKO b0514d6149
fix(i18n): update tests for french and spanish (#878)
* 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>
2023-08-07 14:13:41 +02:00

33 lines
821 B
TypeScript

"use client";
import { UUID } from "crypto";
import { useParams } from "next/navigation";
import { useTranslation } from "react-i18next";
import { BrainManagementTabs } from "./components";
const BrainsManagement = (): JSX.Element => {
const params = useParams();
const { t } = useTranslation(["brain"]);
const brainId = params?.brainId as UUID | undefined;
if (brainId === undefined) {
return (
<div className="flex justify-center mt-5 w-full">
<div className="bg-blue-100 border border-blue-400 text-blue-700 px-4 py-3 rounded relative max-w-md h-fit">
<p>{ t("selectBrain") }</p>
</div>
</div>
);
}
return (
<main className="flex flex-col w-full pt-20 px-20 mb-10">
<BrainManagementTabs />
</main>
);
};
export default BrainsManagement;