import { UUID } from "crypto"; import { useTranslation } from "react-i18next"; import { BrainUser } from "./components"; import { useBrainUsers } from "./hooks/useBrainUsers"; type BrainUsersProps = { brainId: UUID; }; export const BrainUsers = ({ brainId }: BrainUsersProps): JSX.Element => { const { t } = useTranslation(["translation","config"]); const { brainUsers, fetchBrainUsers, isFetchingBrainUsers } = useBrainUsers(brainId); if (isFetchingBrainUsers) { return
{t("loading")}
; } if (brainUsers.length === 0) { return{t("noUser",{ns:'config'})}
; } return ( <> {brainUsers.map((subscription) => (