diff --git a/src/components/Chat/styled.ts b/src/components/Chat/styled.ts index 81cfa6f..3507395 100644 --- a/src/components/Chat/styled.ts +++ b/src/components/Chat/styled.ts @@ -23,6 +23,8 @@ export const ChatMissing = styled.div` export const TopSection = styled.div` min-height: 50px; + margin: 8px 0; + box-shadow: 0px 10px 16px -16px rgba(66, 68, 90, 0.434); div { margin: 0 2rem; diff --git a/src/components/SearchNewUser/index.tsx b/src/components/SearchNewUser/index.tsx index 5a6366c..406cd4c 100644 --- a/src/components/SearchNewUser/index.tsx +++ b/src/components/SearchNewUser/index.tsx @@ -108,13 +108,13 @@ export default function Search({ { merge: true } ); } + setUser(null); + setUsername(""); + setIsSearchOpen(false); } catch (err) { const error = ensureError(err); setErrorMessage(error.message); } - - setUser(null); - setUsername(""); }; return ( <> diff --git a/src/components/Sidebar/Footer/styled.ts b/src/components/Sidebar/Footer/styled.ts index 76edca8..eaaa6ed 100644 --- a/src/components/Sidebar/Footer/styled.ts +++ b/src/components/Sidebar/Footer/styled.ts @@ -6,6 +6,7 @@ export const FooterContainer = styled("div")` flex-grow: 0; border-top: 1px solid ${({ theme }) => theme.tertiary}; padding-top: 1rem; + margin-bottom: 0.5rem; & div { margin: 0 1rem; diff --git a/src/context/AuthContext.tsx b/src/context/AuthContext.tsx index 2405288..9c52541 100644 --- a/src/context/AuthContext.tsx +++ b/src/context/AuthContext.tsx @@ -1,7 +1,6 @@ import { createContext, useEffect, useState } from "react"; -import { User, onAuthStateChanged } from "firebase/auth"; +import { User } from "firebase/auth"; import { auth } from "../firebaseConfig"; -import { useNavigate } from "react-router-dom"; interface AuthContextType { loggedUser: User | null; @@ -19,23 +18,20 @@ type Props = { export const AuthContextProvider = ({ children }: Props) => { const [loggedUser, setLoggedUser] = useState(null); - // const [isReady, setIsReady] = useState(false); useEffect(() => { if (loggedUser) { return; } const unsub = auth.onAuthStateChanged((user) => { - console.log(user); - console.log(user?.displayName); if (user) { setLoggedUser(user); } }); return () => unsub(); - }, []); - console.log(loggedUser); + }, [loggedUser]); + return ( {children} diff --git a/src/pages/Register/index.tsx b/src/pages/Register/index.tsx index 1c2688c..6c22ee2 100644 --- a/src/pages/Register/index.tsx +++ b/src/pages/Register/index.tsx @@ -138,7 +138,6 @@ function Register() { setIsLoading(true); const response = await FirebaseAuthService.loginWithGoogle(); if (response.user.photoURL) { - console.log(response.user.displayName); updateUserProfile(response.user, response.user.photoURL); } else { getDownloadURL(ref(storage, "avatarIcon.png")).then( diff --git a/src/styles/theme/theme.ts b/src/styles/theme/theme.ts index 9a88cef..75e4b58 100644 --- a/src/styles/theme/theme.ts +++ b/src/styles/theme/theme.ts @@ -33,7 +33,7 @@ export const THEMES: Record = { textPrimary: "#292929", textSecondary: "#ffffff", backgroundGradient: - "linear-gradient(90deg, rgba(191,187,255,1) 0%, rgba(192,245,255,1) 100%)", + "linear-gradient(30deg, rgba(191,187,255,1) 0%, rgba(192,245,255,1) 100%)", error: "#b50000", }, dark: {