Skip to content

Commit

Permalink
Sidebar visibility by service ( API TOKENS )
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikMatiasko committed Aug 9, 2024
1 parent 253197c commit 92b716f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion http-gateway/web/packages/shared-ui
3 changes: 3 additions & 0 deletions http-gateway/web/src/containers/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import AppLayout from '@/containers/App/AppLayout/AppLayout'
import { setTheme, setThemes } from './slice'
import { CombinedStoreType } from '@/store/store'
import { defaultMenu } from '@/routes'
import { updateSidebarVisibility } from '@shared-ui/common/services/sidebar'

const App = (props: { mockApp: boolean }) => {
const { formatMessage: _ } = useIntl()
Expand Down Expand Up @@ -52,6 +53,8 @@ const App = (props: { mockApp: boolean }) => {
wellKnown.ui = { visibility: { mainSidebar: defaultMenu } }
}

wellKnown.ui = updateSidebarVisibility(wellKnown)

const clientId = webOauthClient?.clientId
const httpGatewayAddress = wellKnown.httpGatewayAddress
const authority = wellKnown.authority
Expand Down
4 changes: 1 addition & 3 deletions http-gateway/web/src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,7 @@ export const getMenu = (menuConfig: any): MenuGroup[] => [
link: pages.API_TOKENS.LINK,
paths: [pages.API_TOKENS.LINK, pages.API_TOKENS.DETAIL],
exact: true,
dataTestId: testId.menu.apiTokens,
// visibility: menuConfig.apiTokens === false ? false : 'disabled',
visibility: true,
visibility: menuConfig.apiTokens === false ? false : 'disabled',
},
{
icon: <IconNet />,
Expand Down

0 comments on commit 92b716f

Please sign in to comment.