From 430cfc3a2a72f69ee7847bacf955d8a5d29b2de5 Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 22 Mar 2022 11:41:44 -0400 Subject: [PATCH] Remove unneeded 'event' when using Reach Menu --- app/soapbox/features/ui/components/profile-dropdown.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/soapbox/features/ui/components/profile-dropdown.tsx b/app/soapbox/features/ui/components/profile-dropdown.tsx index f5a0d355c..43f31cfa3 100644 --- a/app/soapbox/features/ui/components/profile-dropdown.tsx +++ b/app/soapbox/features/ui/components/profile-dropdown.tsx @@ -43,16 +43,13 @@ const ProfileDropdown: React.FC = ({ account, children }) => { const isCurrentAccountStaff = isStaff(currentAccount) || false; const otherAccounts = useAppSelector((state) => authUsers.map((authUser: any) => getAccount(state, authUser.get('id')))); - const handleLogOut = (event: React.MouseEvent) => { - event.preventDefault(); - + const handleLogOut = () => { dispatch(logOut(intl)); }; const handleSwitchAccount = (account: AccountEntity) => { - return (event: React.MouseEvent) => { + return () => { dispatch(switchAccount(account.id)); - event.preventDefault(); }; };