Skip to content

Commit

Permalink
feat: conditionally render FriendButton based on session state in Use…
Browse files Browse the repository at this point in the history
…rData component
  • Loading branch information
pranshu05 committed Dec 7, 2024
1 parent f8f8fb0 commit 3e90f59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/(user)/UserData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function UserData({ session, user, userId }) {
(
<button onClick={() => signOut()} className="px-4 py-2 bg-[#121212] border-[2px] border-[#333] rounded-md">Sign Out</button>
) : (
<FriendButton currentUserId={currentUserId} userId={userId} />
session && <FriendButton currentUserId={currentUserId} userId={userId} />
)
}
</div>
Expand Down

0 comments on commit 3e90f59

Please sign in to comment.