make the part to update smaller (#214)

This makes switching between sections a bit nicer
This commit is contained in:
Erik Jan de Wit 2020-11-12 20:08:09 +01:00 committed by GitHub
parent 19e1b70a12
commit b06cea6fd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,43 +73,40 @@ export const PageNav: React.FunctionComponent = () => {
); );
return ( return (
<DataLoader loader={realmLoader}> <PageSidebar
{(realmList) => ( nav={
<PageSidebar <Nav onSelect={onSelect}>
nav={ <NavList>
<Nav onSelect={onSelect}> <DataLoader loader={realmLoader}>
<NavList> {(realmList) => (
<NavItem className="keycloak__page_nav__nav_item__realm-selector"> <NavItem className="keycloak__page_nav__nav_item__realm-selector">
<RealmSelector realmList={realmList.data || []} /> <RealmSelector realmList={realmList.data || []} />
</NavItem> </NavItem>
</NavList>
{showManage && (
<NavGroup title={t("manage")}>
<LeftNav title="clients" path="/clients" />
<LeftNav title="clientScopes" path="/client-scopes" />
<LeftNav title="realmRoles" path="/roles" />
<LeftNav title="users" path="/users" />
<LeftNav title="groups" path="/groups" />
<LeftNav title="sessions" path="/sessions" />
<LeftNav title="events" path="/events" />
</NavGroup>
)} )}
</DataLoader>
</NavList>
{showManage && (
<NavGroup title={t("manage")}>
<LeftNav title="clients" path="/clients" />
<LeftNav title="clientScopes" path="/client-scopes" />
<LeftNav title="realmRoles" path="/roles" />
<LeftNav title="users" path="/users" />
<LeftNav title="groups" path="/groups" />
<LeftNav title="sessions" path="/sessions" />
<LeftNav title="events" path="/events" />
</NavGroup>
)}
{showConfigure && ( {showConfigure && (
<NavGroup title={t("configure")}> <NavGroup title={t("configure")}>
<LeftNav title="realmSettings" path="/realm-settings" /> <LeftNav title="realmSettings" path="/realm-settings" />
<LeftNav title="authentication" path="/authentication" /> <LeftNav title="authentication" path="/authentication" />
<LeftNav <LeftNav title="identityProviders" path="/identity-providers" />
title="identityProviders" <LeftNav title="userFederation" path="/user-federation" />
path="/identity-providers" </NavGroup>
/> )}
<LeftNav title="userFederation" path="/user-federation" /> </Nav>
</NavGroup> }
)} />
</Nav>
}
/>
)}
</DataLoader>
); );
}; };