refactor: add user info to authData
This commit is contained in:
@@ -116,7 +116,7 @@ export default function MyAccount() {
|
||||
const [editModal, setEditModal] = useState(null);
|
||||
const [uploadAvatar, { isSuccess: uploadSuccess }] = useUpdateAvatarMutation();
|
||||
const loginUser = useAppSelector((store) => {
|
||||
return store.contacts.byId[store.authData.uid];
|
||||
return store.authData.user;
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -96,7 +96,7 @@ const navs = [
|
||||
|
||||
const useNavs = () => {
|
||||
const loginUser = useAppSelector((store) => {
|
||||
return store.contacts.byId[store.authData.uid];
|
||||
return store.authData.user;
|
||||
});
|
||||
return navs.filter((nav) => {
|
||||
if (loginUser?.is_admin) {
|
||||
|
||||
Reference in New Issue
Block a user