ordering-ui-react-native 0.16.39-release → 0.16.40-release

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.16.39-release",
3
+ "version": "0.16.40-release",
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';
@@ -188,6 +188,10 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
188
188
  }
189
189
  };
190
190
 
191
+ const convertToRadian = (value: number) => {
192
+ return value * Math.PI / 180
193
+ }
194
+
191
195
  const getDistance = (lat1: any, lon1: any, lat2: any, lon2: any) => {
192
196
  const R = 6371 // km
193
197
  const dLat = convertToRadian(lat2 - lat1)