Исправление ошибок в OtherProfile
This commit is contained in:
@@ -5,11 +5,11 @@ import axios from 'axios';
|
|||||||
import Header from './Header';
|
import Header from './Header';
|
||||||
|
|
||||||
const OtherProfile = () => {
|
const OtherProfile = () => {
|
||||||
|
const navigate = useNavigate();
|
||||||
const {id} = useParams('');
|
const {id} = useParams('');
|
||||||
const [user, setUser] = useState(null);
|
const [user, setUser] = useState(null);
|
||||||
const [avatar, setAvatar] = useState('');
|
const [avatar, setAvatar] = useState('');
|
||||||
const [error, setError] = useState('');
|
const [error, setError] = useState('');
|
||||||
const navigate = useNavigate();
|
|
||||||
const [user_description, setUserDescription] = useState('');
|
const [user_description, setUserDescription] = useState('');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -31,7 +31,7 @@ const OtherProfile = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
checkSession();
|
checkSession();
|
||||||
}, []);
|
}, [id, navigate]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<><Header/>
|
<><Header/>
|
||||||
@@ -40,7 +40,7 @@ const OtherProfile = () => {
|
|||||||
<div className="profile-info">
|
<div className="profile-info">
|
||||||
<div className="name-with-avatar">
|
<div className="name-with-avatar">
|
||||||
<div className="user-name">{user}</div>
|
<div className="user-name">{user}</div>
|
||||||
<img className="profile-avatar" src={avatar}/>
|
<img className="profile-avatar" src={avatar} alt={''}/>
|
||||||
</div>
|
</div>
|
||||||
<div className="user-description">{user_description}</div>
|
<div className="user-description">{user_description}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user