fix active nav link state
This commit is contained in:
@ -20,19 +20,6 @@ export const ProfileHeader = () => {
|
||||
|
||||
const [isLoggingOut, setIsLoggingOut] = useState(false);
|
||||
|
||||
// useEffect(() => {
|
||||
// if (Object.keys(profileInfo).length) {
|
||||
// return;
|
||||
// }
|
||||
// apiRequest(`/user/me`).then((profileInfo) => {
|
||||
// dispatch(
|
||||
// setProfileInfo(
|
||||
// profileInfo.userCard ? profileInfo.userCard : profileInfo
|
||||
// )
|
||||
// );
|
||||
// });
|
||||
// }, [dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!Object.keys(profileInfo).length)
|
||||
apiRequest(`/user/me`).then((profileInfo) => {
|
||||
@ -54,16 +41,16 @@ export const ProfileHeader = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<header className="profileHeader">
|
||||
<div className="profileHeader__head">
|
||||
<div className="profileHeader__container">
|
||||
<NavLink to={"/profile"} className="profileHeader__title">
|
||||
<header className="profile-header">
|
||||
<div className="profile-header__head">
|
||||
<div className="profile-header__container">
|
||||
<NavLink to={"/profile"} className="profile-header__title">
|
||||
itguild.
|
||||
<span>
|
||||
{user === "developer" ? "для разработчиков" : "для партнеров"}
|
||||
</span>
|
||||
</NavLink>
|
||||
<button onClick={handler} className="profileHeader__logout">
|
||||
<button onClick={handler} className="profile-header__logout">
|
||||
{isLoggingOut ? <Loader /> : "Выйти"}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
.profileHeader {
|
||||
.profile-header {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -53,24 +53,24 @@
|
||||
flex-wrap: wrap;
|
||||
column-gap: 30px;
|
||||
|
||||
.active {
|
||||
color: #000000 !important;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none !important;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
font-weight: 700;
|
||||
font-size: 18px;
|
||||
line-height: 32px;
|
||||
color: #807777 !important;
|
||||
color: #807777;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
color: #261a1a !important;
|
||||
color: #261a1a;
|
||||
}
|
||||
}
|
||||
|
||||
a.active {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
column-gap: 15px;
|
||||
|
||||
|
Reference in New Issue
Block a user