diff --git a/src/OtherProfile.js b/src/OtherProfile.js
index ec64dc7..7de5494 100644
--- a/src/OtherProfile.js
+++ b/src/OtherProfile.js
@@ -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 (
<>