mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-16 10:02:30 +03:00
1643b54b7b
* feat: update translations * feat: add <DeleteOrUnsubscribeConfirmationModal /> * test(DeleteOrUnsubscribeConfirmationModal): update tests * feat: redirect to /brains-management on invalid brain id * refactor: move delete_brain_user to delete_brain_users * feat: add /POST '/brains/{brain_id}/subscribe' * feat: handle public brain unsubscription
33 lines
852 B
TypeScript
33 lines
852 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 lg:pt-20 lg:px-20 lg:mb-10 sm:pt-4 sm:px-4 sm=mb-2">
|
|
<BrainManagementTabs />
|
|
</main>
|
|
);
|
|
};
|
|
|
|
export default BrainsManagement;
|