Page MenuHomePhabricator

D6967.diff
No OneTemporary

D6967.diff

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

Mime Type
text/plain
Expires
Mon, Dec 23, 6:51 AM (14 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2693880
Default Alt Text
D6967.diff (739 B)

Event Timeline