ordering-ui-react-native 0.21.82 → 0.21.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.21.82",
3
+ "version": "0.21.83",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -361,7 +361,7 @@ const ProfileUI = (props: ProfileParams) => {
361
361
  />
362
362
  </CenterView>
363
363
 
364
- {user?.level === 4 && !isHideDriverStatus && (
364
+ {user?.level === 4 && (
365
365
  <EnabledStatusDriver>
366
366
  <View style={{ flex: 1 }}>
367
367
  <OText
@@ -369,29 +369,33 @@ const ProfileUI = (props: ProfileParams) => {
369
369
  adjustsFontSizeToFit
370
370
  style={{ ...styles.label, paddingHorizontal: 0 }}>
371
371
  {t(
372
- 'AVAILABLE_TO_RECEIVE_ORDERS',
373
- 'Available to receive orders',
372
+ `${isHideDriverStatus ? 'NOT_' : ''}AVAILABLE_TO_RECEIVE_ORDERS`,
373
+ `${isHideDriverStatus ? 'You are not ' : ''}Available to receive orders`
374
374
  )}
375
375
  </OText>
376
376
  </View>
377
377
 
378
- {userState.loadingDriver ? (
379
- <ActivityIndicator size="small" color={theme.colors.primary} />
380
- ) : (
381
- <ToggleSwitch
382
- isOn={userState?.result?.result?.available}
383
- onColor={theme.colors.primary}
384
- offColor={theme.colors.offColor}
385
- size="small"
386
- onToggle={() =>
387
- handleToggleAvalaibleStatusDriver &&
388
- handleToggleAvalaibleStatusDriver(
389
- !userState?.result?.result?.available,
390
- )
391
- }
392
- disabled={userState?.loading}
393
- animationSpeed={200}
394
- />
378
+ {!isHideDriverStatus && (
379
+ <>
380
+ {userState.loadingDriver ? (
381
+ <ActivityIndicator size="small" color={theme.colors.primary} />
382
+ ) : (
383
+ <ToggleSwitch
384
+ isOn={userState?.result?.result?.available}
385
+ onColor={theme.colors.primary}
386
+ offColor={theme.colors.offColor}
387
+ size="small"
388
+ onToggle={() =>
389
+ handleToggleAvalaibleStatusDriver &&
390
+ handleToggleAvalaibleStatusDriver(
391
+ !userState?.result?.result?.available,
392
+ )
393
+ }
394
+ disabled={userState?.loading}
395
+ animationSpeed={200}
396
+ />
397
+ )}
398
+ </>
395
399
  )}
396
400
  </EnabledStatusDriver>
397
401
  )}