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