diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-22 14:32:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 14:32:15 -0400 |
commit | f0cff95cfa612b295caf68552bc3d29a7fb23a42 (patch) | |
tree | dd3df697478a19048cd4bf6d0b499a91c1a93eb3 /src/components/common/FriendsButton.tsx | |
parent | 4e8e1c0d58424e6b63cfb8470fc0a73c0e6b102b (diff) | |
parent | 33c172cc31957966b14321520c56816ba044db14 (diff) |
Merge pull request #374 from IvanIFChen/hotfix-linting-fixup
[HOTFIX] Linter fixup
Diffstat (limited to 'src/components/common/FriendsButton.tsx')
-rw-r--r-- | src/components/common/FriendsButton.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/components/common/FriendsButton.tsx b/src/components/common/FriendsButton.tsx index 6ddad93f..ae901229 100644 --- a/src/components/common/FriendsButton.tsx +++ b/src/components/common/FriendsButton.tsx @@ -31,9 +31,12 @@ const FriendsButton: React.FC<FriendsButtonProps> = ({ }) => { const dispatch = useDispatch(); - const {user = NO_USER, profile = NO_PROFILE} = userXId - ? useSelector((state: RootState) => state.userX[screenType][userXId]) - : useSelector((state: RootState) => state.user); + const { + user = NO_USER, + profile = NO_PROFILE, + } = useSelector((state: RootState) => + userXId ? state.userX[screenType][userXId] : state.user, + ); const {user: loggedInUser = NO_USER} = useSelector( (state: RootState) => state.user, |