registration
This commit is contained in:
@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { NavLink, useNavigate } from "react-router-dom";
|
||||
|
||||
import {auth, getProfileInfo, setProfileInfo} from "@redux/outstaffingSlice";
|
||||
import { auth, getProfileInfo, setProfileInfo } from "@redux/outstaffingSlice";
|
||||
import { getRole } from "@redux/roleSlice";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
@ -30,7 +30,11 @@ export const ProfileHeader = () => {
|
||||
return;
|
||||
}
|
||||
apiRequest(`/user/me`).then((profileInfo) => {
|
||||
dispatch(setProfileInfo(profileInfo.userCard ? profileInfo.userCard : profileInfo))
|
||||
dispatch(
|
||||
setProfileInfo(
|
||||
profileInfo.userCard ? profileInfo.userCard : profileInfo
|
||||
)
|
||||
);
|
||||
});
|
||||
}, [dispatch]);
|
||||
|
||||
|
Reference in New Issue
Block a user