ordering-ui-react-native 0.21.5 → 0.21.6

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.5",
3
+ "version": "0.21.6",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -159,7 +159,10 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
159
159
 
160
160
  useEffect(() => {
161
161
  if (reorderState?.error) {
162
- showToast(ToastType.Error, reorderState?.result)
162
+ const errorMessage = (Array.isArray(reorderState?.result) || typeof reorderState?.result === 'string')
163
+ ? reorderState?.result
164
+ : t('CANT_REORDER_FOR_THIS_BUSINESS', 'Can’t reorder for this store, please create order manually.')
165
+ showToast(ToastType.Error, errorMessage)
163
166
  }
164
167
  }, [reorderState])
165
168