Fix update

This commit is contained in:
T'JAMPENS QUENTIN p2406187 committed 2026-02-24 17:29:24 +01:00
1 parent f0534bd0f5
commit 8d7a55c5f8
1 file changed
+6 -4
+6 -4
View File
@@ -35,7 +35,6 @@ interface AuthContextType {
update: () => void;
}
function ProfilePage() {
const navigate = useNavigate();
@@ -46,7 +45,7 @@ function ProfilePage() {
const isOwnProfile = !id || user.id.toString() === id;
useEffect(() => {
update();
(async () => {
if (!isOwnProfile) {
@@ -64,9 +63,12 @@ function ProfilePage() {
}
setProfileUser(res.data);
} else setProfileUser(user)
} else {
update();
setProfileUser(user)
}
})()
}, []);
}, [user]);
return (
<div className={styles.container}>