From 60d787ef4c9a6867ab0159c5576fed429f9a48c6 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Fri, 4 Aug 2023 15:39:32 -0500 Subject: [PATCH] fix: uses session to update user info for notifications check (#1486) --- components/molecules/AuthSection/auth-section.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/components/molecules/AuthSection/auth-section.tsx b/components/molecules/AuthSection/auth-section.tsx index ec45a4e75c..f5f594eff8 100644 --- a/components/molecules/AuthSection/auth-section.tsx +++ b/components/molecules/AuthSection/auth-section.tsx @@ -63,14 +63,10 @@ const AuthSection: React.FC = ({}) => { }; useEffect(() => { - const getUser = async () => { - if (session && !userInfo) { - setUserInfo(session); - } - }; - - getUser(); - }, [userInfo]); + if (session && !userInfo) { + setUserInfo(session); + } + }, [session]); const authMenu = { authed: [ @@ -161,7 +157,7 @@ const AuthSection: React.FC = ({}) => { ) : (
- You do not have any unread notification + You don't have any unread notifications
)}