ordering-ui-react-native 0.23.75-test → 0.23.75-test3

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.23.75-test",
3
+ "version": "0.23.75-test3",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -48,7 +48,7 @@ const MapViewComponent = (props: MapViewParams) => {
48
48
  const ASPECT_RATIO = useMemo(() => {
49
49
  if (typeof width !== 'number' || typeof height !== 'number' || height === 0) {
50
50
  console.error('Invalid screen dimensions');
51
- return .3 // Valor predeterminado o manejo de error
51
+ return 0.3 // Valor predeterminado o manejo de error
52
52
  }
53
53
  return width / height;
54
54
  }, [width, height])
@@ -60,7 +60,7 @@ const MapViewComponent = (props: MapViewParams) => {
60
60
  });
61
61
  };
62
62
 
63
- /* const fitCoordinates = (location?: any) => {
63
+ const fitCoordinates = (location?: any) => {
64
64
  if (mapRef.current && typeof location.latitude === 'number' && !Number.isNaN(location.latitude) && typeof location.longitude === 'number' && !Number.isNaN(location.longitude)) {
65
65
  const isSendCoordinates =
66
66
  location &&
@@ -82,7 +82,7 @@ const MapViewComponent = (props: MapViewParams) => {
82
82
  },
83
83
  );
84
84
  }
85
- }; */
85
+ };
86
86
 
87
87
  const onPressZoomIn = () => {
88
88
  const lastRegion = mapRef?.current?.__lastRegion
@@ -102,9 +102,9 @@ const MapViewComponent = (props: MapViewParams) => {
102
102
  })
103
103
  }
104
104
 
105
- /* useEffect(() => {
105
+ useEffect(() => {
106
106
  fitCoordinates(locationSelected || userLocation);
107
- }, [userLocation, locationSelected]); */
107
+ }, [userLocation, locationSelected]);
108
108
 
109
109
 
110
110
  useEffect(() => {
@@ -277,7 +277,7 @@ const MapViewComponent = (props: MapViewParams) => {
277
277
  zoomControlEnabled
278
278
  cacheEnabled
279
279
  moveOnMarkerPress
280
- onTouchStart={() => (following.current = false)}
280
+ /* onTouchStart={() => (following.current = false)} */
281
281
  >
282
282
  <>
283
283
  {Object.values(markerGroups).length ? (Object.values(markerGroups).map((marker: any) => (
@@ -320,7 +320,7 @@ const MapViewComponent = (props: MapViewParams) => {
320
320
  ) : null}
321
321
  </>
322
322
  </MapView>
323
- <OFab
323
+ {/* <OFab
324
324
  materialIcon
325
325
  iconName="plus"
326
326
  onPress={() => onPressZoomIn()}
@@ -333,13 +333,19 @@ const MapViewComponent = (props: MapViewParams) => {
333
333
  <OFab
334
334
  materialIcon
335
335
  iconName="minus"
336
- onPress={() => onPressZoomOut()}
336
+ onPress={() => {
337
+ onPressZoomOut()
338
+ setAlertState({
339
+ open: true,
340
+ content: [t('THISISATEST', 'This is a test')]
341
+ })
342
+ }}
337
343
  style={{
338
344
  position: 'absolute',
339
345
  bottom: 35,
340
346
  right: 20,
341
347
  }}
342
- />
348
+ /> */}
343
349
  </View>
344
350
  ) : null}
345
351
  </View>