Skip to content

Commit

Permalink
author-profile fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ramo-dev committed Mar 7, 2024
1 parent c408c75 commit 69f562b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Login = () => {

useEffect(() => {
if (isLoggedin) {
navigate('/');
navigate('/profile');
}
}, [isLoggedin, navigate]);

Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const Navbar = () => {
function handleLogout() {
account.signOut();
const Timer = setTimeout(() => {
window.location.reload()
navigate('/')
}, 300);

return () => clearTimeout(Timer);
Expand Down
3 changes: 2 additions & 1 deletion src/components/blogsData/blogsData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ const BlogsData = () => {
style : {background : '#292b2c'},} )
const userId = account?.currentUser?.uid;
let profilePic = null
let username = account?.currentUser?.displayName
if(account?.currentUser?.photoURL){
profilePic = account?.currentUser?.photoURL
}
Expand All @@ -179,7 +180,7 @@ const BlogsData = () => {
body: content,
userId: userId,
timestamp: serverTimestamp(),
username : account?.currentUser?.displayName,
username : account?.currentUser?.displayName ,
profilePhoto : profilePic
});
toast.dismiss()
Expand Down

0 comments on commit 69f562b

Please sign in to comment.