keycloak-scim/js/apps/account-ui/src/resources/Resources.tsx

38 lines
972 B
TypeScript
Raw Normal View History

2023-01-16 10:23:07 +00:00
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { Tab, Tabs, TabTitleText } from "@patternfly/react-core";
2023-01-16 10:23:07 +00:00
import { ResourcesTab } from "./ResourcesTab";
import { Page } from "../components/page/Page";
const Resources = () => {
const { t } = useTranslation();
const [activeTabKey, setActiveTabKey] = useState(0);
return (
<Page title={t("resources")} description={t("resourceIntroMessage")}>
<Tabs
activeKey={activeTabKey}
onSelect={(_, key) => setActiveTabKey(key as number)}
mountOnEnter
unmountOnExit
>
<Tab
eventKey={0}
title={<TabTitleText>{t("myResources")}</TabTitleText>}
>
<ResourcesTab />
</Tab>
<Tab
eventKey={1}
title={<TabTitleText>{t("sharedWithMe")}</TabTitleText>}
>
<h1>Share</h1>
</Tab>
</Tabs>
</Page>
);
};
export default Resources;