mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-14 08:40:32 +00:00
fix styles and routes
This commit is contained in:
parent
2661fae24b
commit
d8fc8cbe1d
7 changed files with 135 additions and 129 deletions
|
@ -64,7 +64,7 @@ function LoginAndSignUpPage({ signupProp }: { signupProp: boolean }) {
|
|||
localStorage.setItem("refreshToken", refreshToken);
|
||||
}
|
||||
await setUserState();
|
||||
navigate(returnTo, { replace: true });
|
||||
navigate(returnTo);
|
||||
} catch (err: any) {
|
||||
if (err.response?.data) {
|
||||
setErrorMessages(err.response.data);
|
||||
|
@ -84,7 +84,7 @@ function LoginAndSignUpPage({ signupProp }: { signupProp: boolean }) {
|
|||
[name]: value,
|
||||
}));
|
||||
};
|
||||
|
||||
|
||||
const theme = createTheme({
|
||||
breakpoints: {
|
||||
values: {
|
||||
|
@ -96,11 +96,13 @@ function LoginAndSignUpPage({ signupProp }: { signupProp: boolean }) {
|
|||
},
|
||||
},
|
||||
});
|
||||
const matchDownMd = useMediaQuery(theme.breakpoints.down('sm'));
|
||||
const matchDownMd = useMediaQuery(theme.breakpoints.down("sm"));
|
||||
|
||||
return (
|
||||
<div className="background">
|
||||
<div className={matchDownMd ? "login-login" : "login-login blue-background"}>
|
||||
<div
|
||||
className={matchDownMd ? "login-login" : "login-login blue-background"}
|
||||
>
|
||||
<div className="login-part">
|
||||
<div className={signup ? "signup-image" : "login-image"}></div>
|
||||
</div>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
.create-post-image{
|
||||
height: 40vh;
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
object-fit: contain;
|
||||
overflow: hidden;
|
||||
max-width: 600px;
|
||||
display: block;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue