mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-07 06:08:54 +00:00
fix styles and routes
This commit is contained in:
parent
d4bbb71fc3
commit
b5cf9a210a
7 changed files with 135 additions and 129 deletions
|
@ -32,7 +32,7 @@ function Profile() {
|
|||
setUserData(response.data.data);
|
||||
return;
|
||||
} catch (error) {
|
||||
navigate("/", { replace: true }); /* replace to 404 page */
|
||||
navigate("/"); /* replace to 404 page */
|
||||
console.error("Error fetching user profile:", error);
|
||||
return null;
|
||||
}
|
||||
|
@ -40,8 +40,9 @@ function Profile() {
|
|||
|
||||
const ownAccount = username === user?.username;
|
||||
useEffect(() => {
|
||||
setUserData(null);
|
||||
userProfile();
|
||||
}, []);
|
||||
}, [username]);
|
||||
|
||||
const setBio = (bio: string) => {
|
||||
setUserData((prevData) => {
|
||||
|
@ -66,7 +67,6 @@ function Profile() {
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<StyledEngineProvider injectFirst>
|
||||
<div className="profile-display">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue