diff --git a/.env b/.env new file mode 100644 index 000000000..8f287db5c --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +GEOAPIFY_API_KEY= +DEV_API_URL= +PROD_API_URL= \ No newline at end of file diff --git a/.gitignore b/.gitignore index ae7eed4de..32044bee4 100644 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,6 @@ coverage/ # Temporary files created by Metro to check the health of the file watcher .metro-health-check* # testing -/coverage \ No newline at end of file +/coverage + +*.env \ No newline at end of file diff --git a/babel.config.js b/babel.config.js index 0936035ee..4468b67b9 100644 --- a/babel.config.js +++ b/babel.config.js @@ -13,5 +13,16 @@ module.exports = { }, }, ], + [ + 'module:react-native-dotenv', + { + envName: 'APP_ENV', + moduleName: '@env', + path: '.env', + safe: false, + allowUndefined: true, + verbose: false, + }, + ], ], } diff --git a/env.d.ts b/env.d.ts new file mode 100644 index 000000000..54a2fcc52 --- /dev/null +++ b/env.d.ts @@ -0,0 +1,5 @@ +declare module '@env' { + export const GEOAPIFY_API_KEY: string + export const DEV_API_URL: string + export const PROD_API_URL: string +} diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 576c2ee10..b5d188b66 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost (1.83.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.73.1) - - FBReactNativeSpec (0.73.1): + - FBLazyVector (0.73.2) + - FBReactNativeSpec (0.73.2): - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 0.73.1) - - RCTTypeSafety (= 0.73.1) - - React-Core (= 0.73.1) - - React-jsi (= 0.73.1) - - ReactCommon/turbomodule/core (= 0.73.1) + - RCTRequired (= 0.73.2) + - RCTTypeSafety (= 0.73.2) + - React-Core (= 0.73.2) + - React-jsi (= 0.73.2) + - ReactCommon/turbomodule/core (= 0.73.2) - Flipper (0.201.0): - Flipper-Folly (~> 2.6) - Flipper-Boost-iOSX (1.76.0.1.11) @@ -68,9 +68,9 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.73.1): - - hermes-engine/Pre-built (= 0.73.1) - - hermes-engine/Pre-built (0.73.1) + - hermes-engine (0.73.2): + - hermes-engine/Pre-built (= 0.73.2) + - hermes-engine/Pre-built (0.73.2) - libevent (2.1.12) - libwebp (1.3.2): - libwebp/demux (= 1.3.2) @@ -107,26 +107,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.73.1) - - RCTTypeSafety (0.73.1): - - FBLazyVector (= 0.73.1) - - RCTRequired (= 0.73.1) - - React-Core (= 0.73.1) - - React (0.73.1): - - React-Core (= 0.73.1) - - React-Core/DevSupport (= 0.73.1) - - React-Core/RCTWebSocket (= 0.73.1) - - React-RCTActionSheet (= 0.73.1) - - React-RCTAnimation (= 0.73.1) - - React-RCTBlob (= 0.73.1) - - React-RCTImage (= 0.73.1) - - React-RCTLinking (= 0.73.1) - - React-RCTNetwork (= 0.73.1) - - React-RCTSettings (= 0.73.1) - - React-RCTText (= 0.73.1) - - React-RCTVibration (= 0.73.1) - - React-callinvoker (0.73.1) - - React-Codegen (0.73.1): + - RCTRequired (0.73.2) + - RCTTypeSafety (0.73.2): + - FBLazyVector (= 0.73.2) + - RCTRequired (= 0.73.2) + - React-Core (= 0.73.2) + - React (0.73.2): + - React-Core (= 0.73.2) + - React-Core/DevSupport (= 0.73.2) + - React-Core/RCTWebSocket (= 0.73.2) + - React-RCTActionSheet (= 0.73.2) + - React-RCTAnimation (= 0.73.2) + - React-RCTBlob (= 0.73.2) + - React-RCTImage (= 0.73.2) + - React-RCTLinking (= 0.73.2) + - React-RCTNetwork (= 0.73.2) + - React-RCTSettings (= 0.73.2) + - React-RCTText (= 0.73.2) + - React-RCTVibration (= 0.73.2) + - React-callinvoker (0.73.2) + - React-Codegen (0.73.2): - DoubleConversion - FBReactNativeSpec - glog @@ -141,11 +141,11 @@ PODS: - React-rncore - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.73.1): + - React-Core (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.1) + - React-Core/Default (= 0.73.2) - React-cxxreact - React-hermes - React-jsi @@ -155,7 +155,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/CoreModulesHeaders (0.73.1): + - React-Core/CoreModulesHeaders (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -169,7 +169,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/Default (0.73.1): + - React-Core/Default (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -182,23 +182,23 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/DevSupport (0.73.1): + - React-Core/DevSupport (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.1) - - React-Core/RCTWebSocket (= 0.73.1) + - React-Core/Default (= 0.73.2) + - React-Core/RCTWebSocket (= 0.73.2) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.73.1) + - React-jsinspector (= 0.73.2) - React-perflogger - React-runtimescheduler - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.73.1): + - React-Core/RCTActionSheetHeaders (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -212,7 +212,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTAnimationHeaders (0.73.1): + - React-Core/RCTAnimationHeaders (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -226,7 +226,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTBlobHeaders (0.73.1): + - React-Core/RCTBlobHeaders (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -240,7 +240,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTImageHeaders (0.73.1): + - React-Core/RCTImageHeaders (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -254,7 +254,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTLinkingHeaders (0.73.1): + - React-Core/RCTLinkingHeaders (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -268,7 +268,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTNetworkHeaders (0.73.1): + - React-Core/RCTNetworkHeaders (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -282,7 +282,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTSettingsHeaders (0.73.1): + - React-Core/RCTSettingsHeaders (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -296,7 +296,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTTextHeaders (0.73.1): + - React-Core/RCTTextHeaders (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -310,7 +310,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTVibrationHeaders (0.73.1): + - React-Core/RCTVibrationHeaders (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -324,11 +324,11 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTWebSocket (0.73.1): + - React-Core/RCTWebSocket (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.1) + - React-Core/Default (= 0.73.2) - React-cxxreact - React-hermes - React-jsi @@ -338,33 +338,33 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-CoreModules (0.73.1): + - React-CoreModules (0.73.2): - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.1) + - RCTTypeSafety (= 0.73.2) - React-Codegen - - React-Core/CoreModulesHeaders (= 0.73.1) - - React-jsi (= 0.73.1) + - React-Core/CoreModulesHeaders (= 0.73.2) + - React-jsi (= 0.73.2) - React-NativeModulesApple - React-RCTBlob - - React-RCTImage (= 0.73.1) + - React-RCTImage (= 0.73.2) - ReactCommon - SocketRocket (= 0.6.1) - - React-cxxreact (0.73.1): + - React-cxxreact (0.73.2): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.1) - - React-debug (= 0.73.1) - - React-jsi (= 0.73.1) - - React-jsinspector (= 0.73.1) - - React-logger (= 0.73.1) - - React-perflogger (= 0.73.1) - - React-runtimeexecutor (= 0.73.1) - - React-debug (0.73.1) - - React-Fabric (0.73.1): + - React-callinvoker (= 0.73.2) + - React-debug (= 0.73.2) + - React-jsi (= 0.73.2) + - React-jsinspector (= 0.73.2) + - React-logger (= 0.73.2) + - React-perflogger (= 0.73.2) + - React-runtimeexecutor (= 0.73.2) + - React-debug (0.73.2) + - React-Fabric (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -375,20 +375,20 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/animations (= 0.73.1) - - React-Fabric/attributedstring (= 0.73.1) - - React-Fabric/componentregistry (= 0.73.1) - - React-Fabric/componentregistrynative (= 0.73.1) - - React-Fabric/components (= 0.73.1) - - React-Fabric/core (= 0.73.1) - - React-Fabric/imagemanager (= 0.73.1) - - React-Fabric/leakchecker (= 0.73.1) - - React-Fabric/mounting (= 0.73.1) - - React-Fabric/scheduler (= 0.73.1) - - React-Fabric/telemetry (= 0.73.1) - - React-Fabric/templateprocessor (= 0.73.1) - - React-Fabric/textlayoutmanager (= 0.73.1) - - React-Fabric/uimanager (= 0.73.1) + - React-Fabric/animations (= 0.73.2) + - React-Fabric/attributedstring (= 0.73.2) + - React-Fabric/componentregistry (= 0.73.2) + - React-Fabric/componentregistrynative (= 0.73.2) + - React-Fabric/components (= 0.73.2) + - React-Fabric/core (= 0.73.2) + - React-Fabric/imagemanager (= 0.73.2) + - React-Fabric/leakchecker (= 0.73.2) + - React-Fabric/mounting (= 0.73.2) + - React-Fabric/scheduler (= 0.73.2) + - React-Fabric/telemetry (= 0.73.2) + - React-Fabric/templateprocessor (= 0.73.2) + - React-Fabric/textlayoutmanager (= 0.73.2) + - React-Fabric/uimanager (= 0.73.2) - React-graphics - React-jsi - React-jsiexecutor @@ -397,7 +397,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/animations (0.73.1): + - React-Fabric/animations (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -416,7 +416,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.73.1): + - React-Fabric/attributedstring (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -435,7 +435,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.73.1): + - React-Fabric/componentregistry (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -454,7 +454,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.73.1): + - React-Fabric/componentregistrynative (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -473,7 +473,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components (0.73.1): + - React-Fabric/components (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -484,17 +484,17 @@ PODS: - React-Core - React-cxxreact - React-debug - - React-Fabric/components/inputaccessory (= 0.73.1) - - React-Fabric/components/legacyviewmanagerinterop (= 0.73.1) - - React-Fabric/components/modal (= 0.73.1) - - React-Fabric/components/rncore (= 0.73.1) - - React-Fabric/components/root (= 0.73.1) - - React-Fabric/components/safeareaview (= 0.73.1) - - React-Fabric/components/scrollview (= 0.73.1) - - React-Fabric/components/text (= 0.73.1) - - React-Fabric/components/textinput (= 0.73.1) - - React-Fabric/components/unimplementedview (= 0.73.1) - - React-Fabric/components/view (= 0.73.1) + - React-Fabric/components/inputaccessory (= 0.73.2) + - React-Fabric/components/legacyviewmanagerinterop (= 0.73.2) + - React-Fabric/components/modal (= 0.73.2) + - React-Fabric/components/rncore (= 0.73.2) + - React-Fabric/components/root (= 0.73.2) + - React-Fabric/components/safeareaview (= 0.73.2) + - React-Fabric/components/scrollview (= 0.73.2) + - React-Fabric/components/text (= 0.73.2) + - React-Fabric/components/textinput (= 0.73.2) + - React-Fabric/components/unimplementedview (= 0.73.2) + - React-Fabric/components/view (= 0.73.2) - React-graphics - React-jsi - React-jsiexecutor @@ -503,7 +503,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/inputaccessory (0.73.1): + - React-Fabric/components/inputaccessory (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -522,7 +522,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.73.1): + - React-Fabric/components/legacyviewmanagerinterop (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -541,7 +541,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/modal (0.73.1): + - React-Fabric/components/modal (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -560,7 +560,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/rncore (0.73.1): + - React-Fabric/components/rncore (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -579,7 +579,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.73.1): + - React-Fabric/components/root (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -598,7 +598,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/safeareaview (0.73.1): + - React-Fabric/components/safeareaview (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -617,7 +617,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/scrollview (0.73.1): + - React-Fabric/components/scrollview (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -636,7 +636,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/text (0.73.1): + - React-Fabric/components/text (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -655,7 +655,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/textinput (0.73.1): + - React-Fabric/components/textinput (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -674,7 +674,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/unimplementedview (0.73.1): + - React-Fabric/components/unimplementedview (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -693,7 +693,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.73.1): + - React-Fabric/components/view (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -713,7 +713,7 @@ PODS: - React-utils - ReactCommon/turbomodule/core - Yoga - - React-Fabric/core (0.73.1): + - React-Fabric/core (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -732,7 +732,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.73.1): + - React-Fabric/imagemanager (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -751,7 +751,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.73.1): + - React-Fabric/leakchecker (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -770,7 +770,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.73.1): + - React-Fabric/mounting (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -789,7 +789,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.73.1): + - React-Fabric/scheduler (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -808,7 +808,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.73.1): + - React-Fabric/telemetry (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -827,7 +827,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.73.1): + - React-Fabric/templateprocessor (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -846,7 +846,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/textlayoutmanager (0.73.1): + - React-Fabric/textlayoutmanager (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -866,7 +866,7 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.73.1): + - React-Fabric/uimanager (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog @@ -885,42 +885,42 @@ PODS: - React-runtimescheduler - React-utils - ReactCommon/turbomodule/core - - React-FabricImage (0.73.1): + - React-FabricImage (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.1) - - RCTTypeSafety (= 0.73.1) + - RCTRequired (= 0.73.2) + - RCTTypeSafety (= 0.73.2) - React-Fabric - React-graphics - React-ImageManager - React-jsi - - React-jsiexecutor (= 0.73.1) + - React-jsiexecutor (= 0.73.2) - React-logger - React-rendererdebug - React-utils - ReactCommon - Yoga - - React-graphics (0.73.1): + - React-graphics (0.73.2): - glog - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 0.73.1) + - React-Core/Default (= 0.73.2) - React-utils - - React-hermes (0.73.1): + - React-hermes (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 0.73.1) + - React-cxxreact (= 0.73.2) - React-jsi - - React-jsiexecutor (= 0.73.1) - - React-jsinspector (= 0.73.1) - - React-perflogger (= 0.73.1) - - React-ImageManager (0.73.1): + - React-jsiexecutor (= 0.73.2) + - React-jsinspector (= 0.73.2) + - React-perflogger (= 0.73.2) + - React-ImageManager (0.73.2): - glog - RCT-Folly/Fabric - React-Core/Default @@ -929,34 +929,36 @@ PODS: - React-graphics - React-rendererdebug - React-utils - - React-jserrorhandler (0.73.1): + - React-jserrorhandler (0.73.2): - RCT-Folly/Fabric (= 2022.05.16.00) - React-debug - React-jsi - React-Mapbuffer - - React-jsi (0.73.1): + - React-jsi (0.73.2): - boost (= 1.83.0) - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (0.73.1): + - React-jsiexecutor (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 0.73.1) - - React-jsi (= 0.73.1) - - React-perflogger (= 0.73.1) - - React-jsinspector (0.73.1) - - React-logger (0.73.1): + - React-cxxreact (= 0.73.2) + - React-jsi (= 0.73.2) + - React-perflogger (= 0.73.2) + - React-jsinspector (0.73.2) + - React-logger (0.73.2): - glog - - React-Mapbuffer (0.73.1): + - React-Mapbuffer (0.73.2): - glog - React-debug - - react-native-cameraroll (7.2.2): + - react-native-cameraroll (7.4.0): + - glog + - RCT-Folly (= 2022.05.16.00) - React-Core - react-native-geolocation (3.1.0): - React-Core @@ -970,8 +972,8 @@ PODS: - React-Core - react-native-webview (13.6.3): - React-Core - - React-nativeconfig (0.73.1) - - React-NativeModulesApple (0.73.1): + - React-nativeconfig (0.73.2) + - React-NativeModulesApple (0.73.2): - glog - hermes-engine - React-callinvoker @@ -981,10 +983,10 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.73.1) - - React-RCTActionSheet (0.73.1): - - React-Core/RCTActionSheetHeaders (= 0.73.1) - - React-RCTAnimation (0.73.1): + - React-perflogger (0.73.2) + - React-RCTActionSheet (0.73.2): + - React-Core/RCTActionSheetHeaders (= 0.73.2) + - React-RCTAnimation (0.73.2): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -992,7 +994,7 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTAppDelegate (0.73.1): + - React-RCTAppDelegate (0.73.2): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -1006,7 +1008,7 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon - - React-RCTBlob (0.73.1): + - React-RCTBlob (0.73.2): - hermes-engine - RCT-Folly (= 2022.05.16.00) - React-Codegen @@ -1016,7 +1018,7 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTFabric (0.73.1): + - React-RCTFabric (0.73.2): - glog - hermes-engine - RCT-Folly/Fabric (= 2022.05.16.00) @@ -1034,7 +1036,7 @@ PODS: - React-runtimescheduler - React-utils - Yoga - - React-RCTImage (0.73.1): + - React-RCTImage (0.73.2): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1043,14 +1045,14 @@ PODS: - React-NativeModulesApple - React-RCTNetwork - ReactCommon - - React-RCTLinking (0.73.1): + - React-RCTLinking (0.73.2): - React-Codegen - - React-Core/RCTLinkingHeaders (= 0.73.1) - - React-jsi (= 0.73.1) + - React-Core/RCTLinkingHeaders (= 0.73.2) + - React-jsi (= 0.73.2) - React-NativeModulesApple - ReactCommon - - ReactCommon/turbomodule/core (= 0.73.1) - - React-RCTNetwork (0.73.1): + - ReactCommon/turbomodule/core (= 0.73.2) + - React-RCTNetwork (0.73.2): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1058,7 +1060,7 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTSettings (0.73.1): + - React-RCTSettings (0.73.2): - RCT-Folly (= 2022.05.16.00) - RCTTypeSafety - React-Codegen @@ -1066,25 +1068,25 @@ PODS: - React-jsi - React-NativeModulesApple - ReactCommon - - React-RCTText (0.73.1): - - React-Core/RCTTextHeaders (= 0.73.1) + - React-RCTText (0.73.2): + - React-Core/RCTTextHeaders (= 0.73.2) - Yoga - - React-RCTVibration (0.73.1): + - React-RCTVibration (0.73.2): - RCT-Folly (= 2022.05.16.00) - React-Codegen - React-Core/RCTVibrationHeaders - React-jsi - React-NativeModulesApple - ReactCommon - - React-rendererdebug (0.73.1): + - React-rendererdebug (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - RCT-Folly (= 2022.05.16.00) - React-debug - - React-rncore (0.73.1) - - React-runtimeexecutor (0.73.1): - - React-jsi (= 0.73.1) - - React-runtimescheduler (0.73.1): + - React-rncore (0.73.2) + - React-runtimeexecutor (0.73.2): + - React-jsi (= 0.73.2) + - React-runtimescheduler (0.73.2): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1095,48 +1097,48 @@ PODS: - React-rendererdebug - React-runtimeexecutor - React-utils - - React-utils (0.73.1): + - React-utils (0.73.2): - glog - RCT-Folly (= 2022.05.16.00) - React-debug - - ReactCommon (0.73.1): - - React-logger (= 0.73.1) - - ReactCommon/turbomodule (= 0.73.1) - - ReactCommon/turbomodule (0.73.1): + - ReactCommon (0.73.2): + - React-logger (= 0.73.2) + - ReactCommon/turbomodule (= 0.73.2) + - ReactCommon/turbomodule (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.1) - - React-cxxreact (= 0.73.1) - - React-jsi (= 0.73.1) - - React-logger (= 0.73.1) - - React-perflogger (= 0.73.1) - - ReactCommon/turbomodule/bridging (= 0.73.1) - - ReactCommon/turbomodule/core (= 0.73.1) - - ReactCommon/turbomodule/bridging (0.73.1): + - React-callinvoker (= 0.73.2) + - React-cxxreact (= 0.73.2) + - React-jsi (= 0.73.2) + - React-logger (= 0.73.2) + - React-perflogger (= 0.73.2) + - ReactCommon/turbomodule/bridging (= 0.73.2) + - ReactCommon/turbomodule/core (= 0.73.2) + - ReactCommon/turbomodule/bridging (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.1) - - React-cxxreact (= 0.73.1) - - React-jsi (= 0.73.1) - - React-logger (= 0.73.1) - - React-perflogger (= 0.73.1) - - ReactCommon/turbomodule/core (0.73.1): + - React-callinvoker (= 0.73.2) + - React-cxxreact (= 0.73.2) + - React-jsi (= 0.73.2) + - React-logger (= 0.73.2) + - React-perflogger (= 0.73.2) + - ReactCommon/turbomodule/core (0.73.2): - DoubleConversion - fmt (~> 6.2.1) - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.1) - - React-cxxreact (= 0.73.1) - - React-jsi (= 0.73.1) - - React-logger (= 0.73.1) - - React-perflogger (= 0.73.1) + - React-callinvoker (= 0.73.2) + - React-cxxreact (= 0.73.2) + - React-jsi (= 0.73.2) + - React-logger (= 0.73.2) + - React-perflogger (= 0.73.2) - RNCClipboard (1.13.2): - React-Core - RNCPicker (2.6.1): @@ -1399,11 +1401,11 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost: 26fad476bfa736552bbfa698a06cc530475c1505 + boost: d3f49c53809116a5d38da093a8aa78bf551aed09 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: 2296bacb2fa157a43991048b0a9d71c1c8b65083 - FBReactNativeSpec: df0ebe69acd14ce0be0269cf75b6e338a727259b + FBLazyVector: fbc4957d9aa695250b55d879c1d86f79d7e69ab4 + FBReactNativeSpec: 86de768f89901ef6ed3207cd686362189d64ac88 Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -1414,57 +1416,57 @@ SPEC CHECKSUMS: FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: 34df9d5034e90bd9bf1505e1ca198760373935af + hermes-engine: b361c9ef5ef3cda53f66e195599b47e1f84ffa35 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 6dda55e483f75d2b43781d8ad5bd7df276a50981 - RCTTypeSafety: df0f2632f4e89938b9b9f6152b5e6c66fc6e969e - React: 5373769b4a544945831d9c5d455212186d68f763 - React-callinvoker: 2c54fb73b27fdf9bd7772f36dcda23d76e0e7d14 - React-Codegen: 65b426d1c3185df0e1d901ff56a23d94e1974791 - React-Core: f0e1e99728ebdb785286b0c4c55f0f923a9d826f - React-CoreModules: 1ee65dbd93429c1c6ec3de069d75f5fde05db5d5 - React-cxxreact: dc0f1968914a6c7da62b1287c1eb84dd3ab0a7bb - React-debug: 52cced4b9e280d03825d687925898cf65bd8712d - React-Fabric: 1805f148aedab4bf31c48c8c3bae6045aeb75275 - React-FabricImage: ee5ee9abe4ab05043fdce515e46f396b025a5028 - React-graphics: a1652cbea6f779a1cf2692987d9c94efcd6e4497 - React-hermes: 12499684a1005213e7ed71a94467ef72cf24320c - React-ImageManager: 5e50ba59059ca7547c8968f936e4ae7a50ff7384 - React-jserrorhandler: 27154e650959506a4455384f3aea134eba62335b - React-jsi: b03ac7f7af1371e3e81e8ac894af4e46454dee79 - React-jsiexecutor: ae30693413a40b7c72f25da2e794997754a780bf - React-jsinspector: 369048694e39942063c5d08e9580b43e2edd379a - React-logger: e0c1e918d9588a9f39c9bc62d9d6bfe9ca238d9d - React-Mapbuffer: 9731a0a63ebaf8976014623c4d637744d7353a7c - react-native-cameraroll: 8acc1cf2c31d38992222fd08c7041691fc98dce3 + RCTRequired: 9b1e7e262745fb671e33c51c1078d093bd30e322 + RCTTypeSafety: a759e3b086eccf3e2cbf2493d22f28e082f958e6 + React: 805f5dd55bbdb92c36b4914c64aaae4c97d358dc + React-callinvoker: 6a697867607c990c2c2c085296ee32cfb5e47c01 + React-Codegen: c4447ffa339f4e7a22e0c9c800eec9084f31899c + React-Core: 49f66fecc7695464e9b7bc7dc7cd9473d2c60584 + React-CoreModules: 710e7c557a1a8180bd1645f5b4bf79f4bd3f5417 + React-cxxreact: 345857b5e4be000c0527df78be3b41a0677a20ce + React-debug: f1637bce73342b2f6eee4982508fdfb088667a87 + React-Fabric: 4dfcff8f14d8e5a7a60b11b7862dad2a9d99c65b + React-FabricImage: 4a9e9510b7f28bbde6a743b18c0cb941a142e938 + React-graphics: dd5af9d8b1b45171fd6933e19fed522f373bcb10 + React-hermes: a52d183a5cf8ccb7020ce3df4275b89d01e6b53e + React-ImageManager: c5b7db131eff71443d7f3a8d686fd841d18befd3 + React-jserrorhandler: 97a6a12e2344c3c4fdd7ba1edefb005215c732f8 + React-jsi: a182068133f80918cd0eec77875abaf943a0b6be + React-jsiexecutor: dacd00ce8a18fc00a0ae6c25e3015a6437e5d2e8 + React-jsinspector: 03644c063fc3621c9a4e8bf263a8150909129618 + React-logger: 66b168e2b2bee57bd8ce9e69f739d805732a5570 + React-Mapbuffer: 9ee041e1d7be96da6d76a251f92e72b711c651d6 + react-native-cameraroll: 3301d62d45616ee9da55ceed04be8d788c3de3ef react-native-geolocation: ef66fb798d96284c6043f0b16c15d9d1d4955db4 react-native-maps: e2b78affd8e90c807a87bd042dc6b1af2decbcf1 react-native-safe-area-context: 0ee144a6170530ccc37a0fd9388e28d06f516a89 react-native-slider: 7d387c7e8dd0b4c12bf49c975c8666435f082a33 react-native-webview: 88293a0f23eca8465c0433c023ec632930e644d0 - React-nativeconfig: 37aecd26d64b79327c3f10e43b2e9a6c425e0a60 - React-NativeModulesApple: 9ca6d2eaa1dd5606588262195b46d0774bdec83a - React-perflogger: 5ffc4d6ccb74eaac7b8b2867e58a447232483d6d - React-RCTActionSheet: eca2174431ff2cc14b7fb847f92b89e081d27541 - React-RCTAnimation: a039b2416aa0a55e6fa7c8cd0a2e870bfffc4caa - React-RCTAppDelegate: be26c542774d36211b1562a9278c72f821887103 - React-RCTBlob: 0d4892d25e57fbbce13e221fff7e4c9567a2ace3 - React-RCTFabric: d11187cac1f4e0141738805f7011145c7786a369 - React-RCTImage: 5b70891cb2adb75bbdc5ad8e6cc56c48e95d90e5 - React-RCTLinking: 5fe4756ab016e9f200e93e771bd6e43ea05f8f50 - React-RCTNetwork: 877b4a85f71c63cf719574f187e3333c1e15a425 - React-RCTSettings: ae477a33a04389f5d42486004b09b04eeba64fd5 - React-RCTText: 08dd5d7173ed279d3468b333217afb22bb7948c3 - React-RCTVibration: 2f906cd58dfd44ff5e4ca4fc0edd8740dceda6be - React-rendererdebug: e3db5db14234d9ee46d2e58fff3b8652ee7da6bc - React-rncore: d1aa3c2f01b22a53bc10ff2775e6ddcd43fc71a2 - React-runtimeexecutor: d87e84455640dc5685e87563c2eaef90e5df8752 - React-runtimescheduler: 93a4c84e46a85c3fc9678abd4f6923b785226ea7 - React-utils: debda2c206770ee2785bdebb7f16d8db9f18838a - ReactCommon: ddb128564dcbfa0287d3d1a2d10f8c7457c971f6 + React-nativeconfig: d753fbbc8cecc8ae413d615599ac378bbf6999bb + React-NativeModulesApple: 964f4eeab1b4325e8b6a799cf4444c3fd4eb0a9c + React-perflogger: 29efe63b7ef5fbaaa50ef6eaa92482f98a24b97e + React-RCTActionSheet: 69134c62aefd362027b20da01cd5d14ffd39db3f + React-RCTAnimation: 3b5a57087c7a5e727855b803d643ac1d445488f5 + React-RCTAppDelegate: a3ce9b69c0620a1717d08e826d4dc7ad8a3a3cae + React-RCTBlob: 26ea660f2be1e6de62f2d2ad9a9c7b9bfabb786f + React-RCTFabric: bb6dbbff2f80b9489f8b2f1d2554aa040aa2e3cd + React-RCTImage: 27b27f4663df9e776d0549ed2f3536213e793f1b + React-RCTLinking: 962880ce9d0e2ea83fd182953538fc4ed757d4da + React-RCTNetwork: 73a756b44d4ad584bae13a5f1484e3ce12accac8 + React-RCTSettings: 6d7f8d807f05de3d01cfb182d14e5f400716faac + React-RCTText: 73006e95ca359595c2510c1c0114027c85a6ddd3 + React-RCTVibration: 599f427f9cbdd9c4bf38959ca020e8fef0717211 + React-rendererdebug: f2946e0a1c3b906e71555a7c4a39aa6a6c0e639b + React-rncore: 74030de0ffef7b1a3fb77941168624534cc9ae7f + React-runtimeexecutor: 2d1f64f58193f00a3ad71d3f89c2bfbfe11cf5a5 + React-runtimescheduler: df8945a656356ff10f58f65a70820478bfcf33ad + React-utils: f5bc61e7ea3325c0732ae2d755f4441940163b85 + ReactCommon: 45b5d4f784e869c44a6f5a8fad5b114ca8f78c53 RNCClipboard: 60fed4b71560d7bfe40e9d35dea9762b024da86d RNCPicker: b18aaf30df596e9b1738e7c1f9ee55402a229dca RNDeviceInfo: db5c64a060e66e5db3102d041ebe3ef307a85120 @@ -1475,7 +1477,7 @@ SPEC CHECKSUMS: SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 VisionCamera: 3cb14dbbf94962e123f56b3f6afe6c6fe5dac955 - Yoga: 4f53dc50008d626fa679c7a1cb4bed898f8c0bde + Yoga: 13c8ef87792450193e117976337b8527b49e8c03 PODFILE CHECKSUM: b64d753f83e1a7ba2eba67e86fc669a429862b8e diff --git a/package.json b/package.json index c4591406e..e57588bfd 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "image-optimization": "bash bin/optimization" }, "dependencies": { - "@react-native-camera-roll/camera-roll": "^7.0.0", + "@react-native-camera-roll/camera-roll": "^7.4.0", "@react-native-clipboard/clipboard": "^1.12.1", "@react-native-community/geolocation": "^3.1.0", "@react-native-community/slider": "^4.4.4", @@ -43,6 +43,7 @@ "@react-navigation/native-stack": "^6.9.13", "geolib": "^3.3.4", "react-native-device-info": "^10.11.0", + "react-native-dotenv": "^3.4.9", "react-native-fast-image": "^8.6.3", "react-native-maps": "^1.7.1", "react-native-screens": "^3.22.1", diff --git a/src/helpers/httpClient/common.ts b/src/helpers/httpClient/common.ts index f8caba8ca..de30c918b 100644 --- a/src/helpers/httpClient/common.ts +++ b/src/helpers/httpClient/common.ts @@ -6,11 +6,9 @@ */ import { NativeModules, Platform } from 'react-native' +import { DEV_API_URL, PROD_API_URL } from '@env' import { Header } from '../../global/types/httpClient/Header' -const API_ENDPOINT = 'http://api.nolosay.com:3001' -const DEV_API_ENDPOINT = 'http://192.168.106.37:3001' // Local ip for testing on real device - /** * @constant defaultHeaders * @description Default headers to send with requests. @@ -46,7 +44,7 @@ interface PostProps { * @param props.headers The headers to send with the request. * @returns Promise of a Response object */ -export function post({ url = API_ENDPOINT, endpoint, body, headers = defaultHeaders }: PostProps): Promise { +export function post({ url = PROD_API_URL, endpoint, body, headers = defaultHeaders }: PostProps): Promise { return requestServer({ url, endpoint, @@ -71,7 +69,7 @@ interface GetProps { * @param props.headers The headers to send with the request. * @returns Promise of a Response object */ -export function get({ url = API_ENDPOINT, endpoint, headers = defaultHeaders }: GetProps): Promise { +export function get({ url = PROD_API_URL, endpoint, headers = defaultHeaders }: GetProps): Promise { return requestServer({ url, endpoint, @@ -100,13 +98,16 @@ interface RequestServerProps { * @returns Promise of a Response object */ export function requestServer({ - url = API_ENDPOINT, + url = PROD_API_URL, endpoint, method, headers, body, }: RequestServerProps): Promise { - return fetch((__DEV__ ? DEV_API_ENDPOINT : url) + endpoint, { + let finalURL + if (url === PROD_API_URL && __DEV__) finalURL = DEV_API_URL + else finalURL = url + return fetch(finalURL + endpoint, { method, headers: { Accept: headers.Accept, diff --git a/src/helpers/httpClient/localization.ts b/src/helpers/httpClient/localization.ts new file mode 100644 index 000000000..e3ffe128d --- /dev/null +++ b/src/helpers/httpClient/localization.ts @@ -0,0 +1,101 @@ +import { GEOAPIFY_API_KEY } from '@env' +import { get } from './common' + +type GeoCodeJSON = { + type: string + version: string + features: { + type: string + geometry: { + type: string + coordinates: [number, number] + } + properties: { + label: string + score: number + id: string + name: string + postcode: string + citycode: string + x: number + y: number + city: string + context: string + type: string + importance: number + street: string + distance: number + } + }[] + attribution: string + licence: string + filters: { + type: string + } + center: [number, number] + limit: number +} + +async function getCityUsingGeoapify({ + latitude, + longitude, +}: { + latitude: number + longitude: number +}): Promise { + try { + const response = await get({ + url: 'https://api.geoapify.com', + endpoint: `/v1/geocode/reverse?lat=${latitude}&lon=${longitude}&apiKey=${GEOAPIFY_API_KEY}`, + }) + + return response.json() + } catch (error) { + console.error('Error in getCityUsingGeoapify:', error) + throw error + } +} + +async function getCityUsingGouv({ + latitude, + longitude, +}: { + latitude: number + longitude: number +}): Promise { + try { + const response = await get({ + url: 'https://api-adresse.data.gouv.fr', + endpoint: `/reverse/?lon=${longitude}&lat=${latitude}&type=city`, + }) + + return response.json() + } catch (error) { + console.error('Error in getCityUsingGouv:', error) + throw error + } +} + +export default async function getCity({ + latitude, + longitude, +}: { + latitude: number + longitude: number +}): Promise { + try { + const gouvResponse = await getCityUsingGouv({ latitude, longitude }) + + if (gouvResponse.features?.length === 0) { + console.log('Unable to get data from gouv, trying with GeoApify') + const geoResponse = await getCityUsingGeoapify({ latitude, longitude }) + + return geoResponse.features[0]?.properties.city || '' + } + } catch (error) { + console.error('Error in getCity:', error) + return '' + } + + return '' +} diff --git a/src/screens/addSection/VideoScreen/useVideoScreenController.tsx b/src/screens/addSection/VideoScreen/useVideoScreenController.tsx index 45b7bb547..0987b131f 100644 --- a/src/screens/addSection/VideoScreen/useVideoScreenController.tsx +++ b/src/screens/addSection/VideoScreen/useVideoScreenController.tsx @@ -130,7 +130,7 @@ const useVideoScreenController = (): VideoScreenController => { const recordIsFinished = async (video: VideoFile) => { setIsLoading(true) const { path } = video - await CameraRoll.save(`file://${path}`, { + await CameraRoll.saveAsset(`file://${path}`, { type: 'video', album: DeviceInfo.getApplicationName(), }) @@ -224,17 +224,20 @@ const useVideoScreenController = (): VideoScreenController => { if (endTimerValue === 0 && defaultEndTimerValue !== 0) { toggleRecording() } - const countdown = setInterval(() => { - setEndTimerValue(prev => prev - 1) - }, 1000) - // eslint-disable-next-line consistent-return - return () => { - clearInterval(countdown) + if (timerValue <= 0) { + const countdown = setInterval(() => { + setEndTimerValue(prev => prev - 1) + }, 1000) + + // eslint-disable-next-line consistent-return + return () => { + clearInterval(countdown) + } } } // eslint-disable-next-line react-hooks/exhaustive-deps -- We only want to run this effect when endTimerValue changes - }, [isRecording, endTimerValue]) + }, [isRecording, endTimerValue, timerValue]) return { hasPermission, diff --git a/src/screens/home/Views/HeaderView.tsx b/src/screens/home/Views/HeaderView.tsx index 8301338b8..630e85c6a 100644 --- a/src/screens/home/Views/HeaderView.tsx +++ b/src/screens/home/Views/HeaderView.tsx @@ -63,7 +63,7 @@ export default function HeaderView({ style={styles.icon} /> - {city} + {city.length > 8 ? `${city.substring(0, 5)}...` : city} ('carousel') const [displaySearchBar, setDisplaySearchBar] = useState(false) const [searchValue, setSearchValue] = useState('') @@ -64,7 +65,14 @@ export default function useHomeScreenController(): HomeScreenController { } useEffect(() => { - Geolocation.getCurrentPosition(info => setAccount({ ...account, localisation: info })) + Geolocation.getCurrentPosition(async info => { + setAccount({ ...account, localisation: info }) + + const reversedCity = await getCity({ latitude: info.coords.latitude, longitude: info.coords.longitude }) + + console.log(reversedCity) + setCity(reversedCity) + }) getAllPlaces() // Avoid infinite loop // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/yarn.lock b/yarn.lock index e0f3f6adc..96d606467 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1527,10 +1527,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@react-native-camera-roll/camera-roll@^7.0.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-7.2.2.tgz#debac059df33cb53e632db4ae8bac1a993464592" - integrity sha512-imxzopalST7BCDRA1VNjlN8JUXiSenH201DX7u3Z2wc/5W9ctPDHkJVheJqdQRO4k0COvNpe3b3RV1zCs3FOrw== +"@react-native-camera-roll/camera-roll@^7.4.0": + version "7.4.0" + resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-7.4.0.tgz#931e25b076b40dc57ca6d380f0a85d494a120f06" + integrity sha512-y0bVpMJLaFphYvMMx1BsqgMA0kXq9CKxKYNnt4ocUvwJj5Rp4TZ233rzJoDqz1oxd56Tz5f1g+yhYN5RImKl8Q== "@react-native-clipboard/clipboard@^1.12.1": version "1.13.2" @@ -3301,6 +3301,11 @@ domutils@^3.0.1: domelementtype "^2.3.0" domhandler "^5.0.3" +dotenv@^16.3.1: + version "16.3.1" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" + integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -6424,6 +6429,13 @@ react-native-device-info@^10.11.0: resolved "https://registry.yarnpkg.com/react-native-device-info/-/react-native-device-info-10.12.0.tgz#be4e71cbcc9a05e8643b1a419a4450d4cef9bbcc" integrity sha512-gnBkjyZNEqRd+5BNrdzuvmlraHTCH/to2x0Gp9rtDt0O9xWWW1MTYohUVWX9A0Ad2HVYcGanDCIvjWp4ngMZFg== +react-native-dotenv@^3.4.9: + version "3.4.9" + resolved "https://registry.yarnpkg.com/react-native-dotenv/-/react-native-dotenv-3.4.9.tgz#621c5b0c1d0c5c7f569bfe5a1d804bec7885c010" + integrity sha512-dbyd+mcy7SUzxEgmt33TRf1FGcNe6swJhXmB0unKkI49F7+pidog9kPtjxMLTAfmKA8gcN2XHQSKltGfGbGCLQ== + dependencies: + dotenv "^16.3.1" + react-native-fast-image@^8.6.3: version "8.6.3" resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-8.6.3.tgz#6edc3f9190092a909d636d93eecbcc54a8822255"