Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve sign up page ui #686

Merged
merged 9 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/assets/blank-profile.webp
Binary file not shown.
18 changes: 17 additions & 1 deletion src/pages/Login/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
color: var(--color);
font-size: 1.2rem;
padding-top: 0.1rem;
line-height: 1.2;
}

.form__bottom {
Expand Down Expand Up @@ -194,6 +195,10 @@
text-align: center;
width: 100%;
}
.login__right img {
width: 100%;
height: 100%;
}

.login__right {
background-image: url("../../assets/login-right.webp");
Expand All @@ -203,6 +208,9 @@
width: 100%;
height: 100%;
}
.signup__right{
background-image: none;
}

/* forgot password */
.forgot-pasword {
Expand All @@ -223,7 +231,15 @@
.forgot-pasword span:hover {
color: rgb(157, 147, 219);
}

.have-account {
text-align: center;
}
.img-outer {
margin: 0 auto;
}
#file {
width: 10rem;
}
/* media query for 840px */
@media (max-width: 840px) {
.login__section {
Expand Down
2 changes: 0 additions & 2 deletions src/pages/Login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { auth, db, facebookProvider, googleProvider } from "../../lib/firebase";
import { faFacebookF, faGoogle } from "@fortawesome/free-brands-svg-icons";
import { playErrorSound, playSuccessSound } from "../../js/sounds";

import Facebook from "../../assets/facebook.svg";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import Google from "../../assets/goggle.svg";
import { faRightToBracket } from "@fortawesome/free-solid-svg-icons";
import logo from "../../assets/logo.webp";
import { useNavigate } from "react-router-dom";
Expand Down
8 changes: 4 additions & 4 deletions src/pages/Profile/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function Profile() {
setEmail(
location?.state?.name === authUser?.displayName
? location?.state?.email || authUser.email
: "",
: ""
);
setUid(location?.state?.uid || authUser.uid);
} else {
Expand All @@ -166,7 +166,7 @@ function Profile() {
if (auth.currentUser) {
const usernameQ = query(
collection(db, "users"),
where("uid", "==", auth.currentUser.uid),
where("uid", "==", auth.currentUser.uid)
);
const unsubscribe = onSnapshot(usernameQ, (querySnapshot) => {
querySnapshot.forEach((doc) => {
Expand All @@ -180,7 +180,7 @@ function Profile() {
useEffect(() => {
const q = query(
collection(db, "posts"),
where("username", "==", location?.state?.name || name),
where("username", "==", location?.state?.name || name)
);
const unsubscribe = onSnapshot(q, (querySnapshot) => {
const userPosts = [];
Expand Down Expand Up @@ -234,7 +234,7 @@ function Profile() {
});
})
.catch((error) => console.error(error));
},
}
);
setVisible(false);
};
Expand Down
Loading
Loading