mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-19 08:42:08 +03:00
50 lines
1.5 KiB
TypeScript
50 lines
1.5 KiB
TypeScript
import { Content, List, Root } from "@radix-ui/react-tabs";
|
|
|
|
import { BrainTabTrigger, PeopleTab } from "./components";
|
|
import { useBrainManagementTabs } from "./hooks/useBrainManagementTabs";
|
|
|
|
export const BrainManagementTabs = (): JSX.Element => {
|
|
const { selectedTab, setSelectedTab, brainId } = useBrainManagementTabs();
|
|
|
|
if (brainId === undefined) {
|
|
return <div />;
|
|
}
|
|
|
|
return (
|
|
<Root
|
|
className="shadow-md min-h-[50%] dark:shadow-primary/25 hover:shadow-xl transition-shadow rounded-xl overflow-hidden bg-white dark:bg-black border border-black/10 dark:border-white/25 p-4 pt-10"
|
|
defaultValue="settings"
|
|
>
|
|
<List className="flex justify-between" aria-label="Manage your brain">
|
|
<BrainTabTrigger
|
|
selected={selectedTab === "settings"}
|
|
label="Settings"
|
|
value="settings"
|
|
onChange={setSelectedTab}
|
|
/>
|
|
<BrainTabTrigger
|
|
selected={selectedTab === "people"}
|
|
label="People"
|
|
value="people"
|
|
onChange={setSelectedTab}
|
|
/>
|
|
<BrainTabTrigger
|
|
selected={selectedTab === "knowledge"}
|
|
label="Knowledge"
|
|
value="knowledge"
|
|
onChange={setSelectedTab}
|
|
/>
|
|
</List>
|
|
|
|
<div className="p-20 pt-5">
|
|
<Content value="settings">
|
|
<p>coming soon</p>
|
|
</Content>
|
|
<Content value="people">
|
|
<PeopleTab brainId={brainId} />
|
|
</Content>
|
|
</div>
|
|
</Root>
|
|
);
|
|
};
|