Skip to content

Commit

Permalink
Merge pull request #253 from zilliztech/gh-248
Browse files Browse the repository at this point in the history
UI enhancement: Show database name under User Tab
  • Loading branch information
shanghaikid authored Aug 28, 2023
2 parents b9bc987 + f4637a2 commit 6cef40c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/hooks/Navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const useNavigationHook = (
const navInfo: NavInfo = {
navTitle: navTrans('user'),
backPath: '',
showDatabaseSelector: false,
showDatabaseSelector: true,
};
setNavInfo(navInfo);
break;
Expand Down
5 changes: 3 additions & 2 deletions client/src/pages/user/Roles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useContext, useEffect, useState } from 'react';
import { makeStyles, Theme, Chip } from '@material-ui/core';
import { useTranslation } from 'react-i18next';
import { UserHttp } from '@/http';
import { rootContext } from '@/context';
import { rootContext, dataContext } from '@/context';
import { useNavigationHook } from '@/hooks';
import AttuGrid from '@/components/grid/Grid';
import { ColDefinitionsType, ToolBarConfig } from '@/components/grid/Types';
Expand All @@ -23,6 +23,7 @@ const useStyles = makeStyles((theme: Theme) => ({
const Roles = () => {
useNavigationHook(ALL_ROUTER_TYPES.USER);
const classes = useStyles();
const { database } = useContext(dataContext);

const [roles, setRoles] = useState<RoleData[]>([]);
const [selectedRole, setSelectedRole] = useState<RoleData[]>([]);
Expand Down Expand Up @@ -186,7 +187,7 @@ const Roles = () => {

useEffect(() => {
fetchRoles();
}, []);
}, [database]);

return (
<div className={classes.wrapper}>
Expand Down

0 comments on commit 6cef40c

Please sign in to comment.