From a1efaab67ca6dfb6cfefa6d3294c6011cf33ebd3 Mon Sep 17 00:00:00 2001 From: Shubhojeet Bera Date: Sun, 12 Mar 2023 21:17:14 +0530 Subject: [PATCH] project updated --- src/Components/Profile.js | 13 ++++++--- src/Components/profile.css | 57 +++++++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 5 deletions(-) diff --git a/src/Components/Profile.js b/src/Components/Profile.js index d739440..a490ded 100644 --- a/src/Components/Profile.js +++ b/src/Components/Profile.js @@ -6,6 +6,7 @@ import { app } from "../Firebase"; import Default from "../imgs/default.png"; import USER from "../imgs/user.png"; import contact from "../imgs/contact.png"; +import LowerNav from "./LowerNav"; import { getAuth, onAuthStateChanged, signOut } from "firebase/auth"; import { useNavigate } from "react-router-dom"; @@ -16,7 +17,6 @@ function Profile() { const [image, setImage] = useState(""); const navigate = useNavigate(); - const checkDP = () => { if (user && user.photoURL && user.photoURL.includes("https")) { setImage(user.photoURL); @@ -30,8 +30,11 @@ function Profile() { useEffect(() => { checkDP(); - }, [user]) - + }, [user]); + + useEffect(() => { + window.scrollTo(0, 0); + }, []); useEffect(() => { onAuthStateChanged(auth, (user) => { @@ -41,7 +44,6 @@ function Profile() { setUser(null); } }); - }, []); return ( @@ -102,6 +104,9 @@ function Profile() { +
+ +