Skip to content

Commit

Permalink
fix: uses session to update user info for notifications check (#1486)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts authored Aug 4, 2023
1 parent 6988e80 commit 60d787e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions components/molecules/AuthSection/auth-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -161,7 +157,7 @@ const AuthSection: React.FC = ({}) => {
</div>
) : (
<div className="px-3 py-2 text-sm text-center text-light-slate-9">
You do not have any unread notification
You don&apos;t have any unread notifications
</div>
)}
</>
Expand Down

0 comments on commit 60d787e

Please sign in to comment.