Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3516008
D6967.id23496.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
739 B
Referenced Files
None
Subscribers
None
D6967.id23496.diff
View Options
diff --git a/native/utils/staff-utils.js b/native/utils/staff-utils.js
--- a/native/utils/staff-utils.js
+++ b/native/utils/staff-utils.js
@@ -1,17 +1,14 @@
// @flow
-import { useSelector } from 'react-redux';
-
import { isStaff } from 'lib/shared/user-utils.js';
+import { useSelector } from '../redux/redux-utils.js';
+
const isStaffRelease = false;
function useIsCurrentUserStaff(): boolean {
- const isCurrentUserStaff = useSelector(
- state =>
- state.currentUserInfo &&
- state.currentUserInfo.id &&
- isStaff(state.currentUserInfo.id),
+ const isCurrentUserStaff = useSelector(state =>
+ state.currentUserInfo?.id ? isStaff(state.currentUserInfo.id) : false,
);
return isCurrentUserStaff;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 11:39 AM (17 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2693880
Default Alt Text
D6967.id23496.diff (739 B)
Attached To
Mode
D6967: [native] Fix useIsCurrentUserStaff hook
Attached
Detach File
Event Timeline
Log In to Comment