2023-07-24 15:17:21 +03:00
|
|
|
"use client";
|
|
|
|
|
2023-07-25 10:54:34 +03:00
|
|
|
import { UUID } from "crypto";
|
|
|
|
import { useParams } from "next/navigation";
|
2023-08-07 15:13:41 +03:00
|
|
|
import { useTranslation } from "react-i18next";
|
2023-07-25 10:54:34 +03:00
|
|
|
|
2023-07-25 11:13:00 +03:00
|
|
|
import { BrainManagementTabs } from "./components";
|
2023-07-25 10:54:34 +03:00
|
|
|
|
2023-07-24 15:17:21 +03:00
|
|
|
const BrainsManagement = (): JSX.Element => {
|
2023-07-25 10:54:34 +03:00
|
|
|
const params = useParams();
|
2023-08-07 15:13:41 +03:00
|
|
|
const { t } = useTranslation(["brain"]);
|
2023-07-25 10:54:34 +03:00
|
|
|
|
|
|
|
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">
|
2023-08-07 15:13:41 +03:00
|
|
|
<p>{ t("selectBrain") }</p>
|
2023-07-25 10:54:34 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-07-24 15:17:21 +03:00
|
|
|
return (
|
2023-09-15 02:09:26 +03:00
|
|
|
<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">
|
2023-07-25 10:54:34 +03:00
|
|
|
<BrainManagementTabs />
|
2023-07-24 15:17:21 +03:00
|
|
|
</main>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BrainsManagement;
|