diff --git a/native/utils/staff-utils.js b/native/utils/staff-utils.js new file mode 100644 --- /dev/null +++ b/native/utils/staff-utils.js @@ -0,0 +1,16 @@ +// @flow + +import { useSelector } from 'react-redux'; + +import { isStaff } from 'lib/shared/user-utils'; + +const isStaffRelease = false; + +function useStaffCanSee(): boolean { + const isCurrentUserStaff = useSelector(state => + isStaff(state.currentUserInfo.id), + ); + return __DEV__ || isStaffRelease || isCurrentUserStaff; +} + +export { useStaffCanSee };