ordering-ui-react-native 0.17.63 → 0.17.64

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.17.63",
3
+ "version": "0.17.64",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -48,7 +48,7 @@ import { OrderTypeSelector } from '../../../OrderTypeSelector';
48
48
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
49
49
  import { BusinessFeaturedController } from '../../../BusinessFeaturedController';
50
50
  import { HighestRatedBusinesses } from '../../../HighestRatedBusinesses';
51
- import { getTypesText, convertToRadian } from '../../../../utils';
51
+ import { getTypesText } from '../../../../utils';
52
52
  import { OrderProgress } from '../../../OrderProgress';
53
53
  import { useFocusEffect, useIsFocused } from '@react-navigation/native';
54
54
  import FastImage from 'react-native-fast-image';
@@ -189,6 +189,10 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
189
189
  }
190
190
  };
191
191
 
192
+ const convertToRadian = (value: number) => {
193
+ return value * Math.PI / 180
194
+ }
195
+
192
196
  const getDistance = (lat1: any, lon1: any, lat2: any, lon2: any) => {
193
197
  const R = 6371 // km
194
198
  const dLat = convertToRadian(lat2 - lat1)