Исправление ошибок в OtherProfile

This commit is contained in:
Dozzy7528
2026-02-03 13:54:10 +03:00
parent 87c3a5b400
commit 86f61d675b

View File

@@ -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>