From 1934e0c8950affa74a2c68b0ee7d1b8b75640322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ch=C3=A1vez?= Date: Wed, 31 May 2023 23:32:59 -0600 Subject: [PATCH] redirect to sign-in when anonymous user clicks on profile email --- src/components/MenuItem.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/MenuItem.js b/src/components/MenuItem.js index 21195a9f4ca2..e672c68b6133 100644 --- a/src/components/MenuItem.js +++ b/src/components/MenuItem.js @@ -22,6 +22,7 @@ import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimen import * as DeviceCapabilities from '../libs/DeviceCapabilities'; import ControlSelection from '../libs/ControlSelection'; import variables from '../styles/variables'; +import * as Session from '../libs/actions/Session'; const propTypes = { ...menuItemPropTypes, @@ -98,7 +99,7 @@ const MenuItem = (props) => { return ( { + onPress={Session.checkIfActionIsAllowed((e) => { if (props.disabled || !props.interactive) { return; } @@ -108,7 +109,7 @@ const MenuItem = (props) => { } props.onPress(e); - }} + })} onPressIn={() => props.shouldBlockSelection && props.isSmallScreenWidth && DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()} onPressOut={ControlSelection.unblock} onSecondaryInteraction={props.onSecondaryInteraction}