Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32315317
D6967.1765297915.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
739 B
Referenced Files
None
Subscribers
None
D6967.1765297915.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
Tue, Dec 9, 4:31 PM (8 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5855402
Default Alt Text
D6967.1765297915.diff (739 B)
Attached To
Mode
D6967: [native] Fix useIsCurrentUserStaff hook
Attached
Detach File
Event Timeline
Log In to Comment