mirror of https://gitee.com/answerdev/answer.git
fix: admin user role_id
This commit is contained in:
parent
a6720613bd
commit
105811d47e
|
@ -56,7 +56,7 @@ const Index = () => {
|
|||
const { setUsers } = usePageUsers();
|
||||
const userInfo = loggedUserInfoStore((state) => state.user);
|
||||
const isAuthor = userInfo?.username === question?.user_info?.username;
|
||||
const isAdmin = userInfo?.is_admin;
|
||||
const isAdmin = userInfo?.role_id === 2;
|
||||
const isLogged = Boolean(userInfo?.access_token);
|
||||
const { state: locationState } = useLocation();
|
||||
|
||||
|
|
Loading…
Reference in New Issue