Ver Fonte

Merge branch 'build-fix' of SashaGoncharov19/nomadmania-app into dev

Viktoriia há 1 ano atrás
pai
commit
ab693a1b44
5 ficheiros alterados com 29 adições e 65 exclusões
  1. 1 1
      Route.tsx
  2. 20 0
      eas.json
  3. 4 6
      package.json
  4. 0 57
      patches/react-native-calendar-picker+7.1.4.patch
  5. 4 1
      src/constants/secrets.ts

+ 1 - 1
Route.tsx

@@ -71,7 +71,7 @@ const Route = () => {
 
   useEffect(() => {
     const prepareApp = async () => {
-      checkTokenAndUpdate();
+      // checkTokenAndUpdate();
       await openDatabases();
       setDbLoaded(true);
       await setupDatabaseAndSync();

+ 20 - 0
eas.json

@@ -3,6 +3,26 @@
     "version": ">= 5.6.0"
   },
   "build": {
+    "preview": {
+      "channel": "development",
+      "android": {
+        "buildType": "apk"
+      },
+      "env": {
+        "ENV": "development"
+      }
+    },
+    "preview2": {
+      "android": {
+        "gradleCommand": ":app:assembleRelease"
+      }
+    },
+    "preview3": {
+      "developmentClient": true
+    },
+    "preview4": {
+      "distribution": "internal"
+    },
     "development": {
       "developmentClient": true,
       "distribution": "internal",

+ 4 - 6
package.json

@@ -26,23 +26,24 @@
     "axios": "^1.6.1",
     "dotenv": "^16.3.1",
     "expo": "~49.0.15",
+    "expo-asset": "8.10.1",
     "expo-checkbox": "~2.4.0",
+    "expo-constants": "14.4.2",
     "expo-dev-client": "~2.4.12",
+    "expo-file-system": "15.4.5",
+    "expo-font": "11.4.0",
     "expo-image": "~1.3.5",
     "expo-image-picker": "~14.3.2",
     "expo-location": "~16.1.0",
     "expo-notifications": "~0.20.1",
     "expo-splash-screen": "~0.20.5",
     "expo-sqlite": "~11.3.3",
-    "expo-status-bar": "~1.6.0",
     "expo-updates": "~0.18.19",
     "formik": "^2.4.5",
     "moment": "^2.29.4",
     "patch-package": "^8.0.0",
-    "postinstall-postinstall": "^2.1.0",
     "react": "18.2.0",
     "react-native": "0.72.10",
-    "react-native-calendar-picker": "^7.1.4",
     "react-native-calendars": "^1.1304.1",
     "react-native-device-detection": "^0.2.1",
     "react-native-gesture-handler": "~2.12.0",
@@ -54,8 +55,6 @@
     "react-native-modal": "^13.0.1",
     "react-native-pager-view": "6.2.0",
     "react-native-progress": "^5.0.1",
-    "react-native-reanimated": "~3.3.0",
-    "react-native-render-html": "^6.3.4",
     "react-native-safe-area-context": "4.6.3",
     "react-native-screens": "~3.22.0",
     "react-native-searchable-dropdown-kj": "^1.9.1",
@@ -67,7 +66,6 @@
   "devDependencies": {
     "@babel/core": "^7.20.0",
     "@types/react": "~18.2.14",
-    "@types/react-native-calendar-picker": "^7.0.6",
     "prettier": "^3.1.0",
     "react-native-svg-transformer": "^1.1.0",
     "typescript": "^5.1.3"

+ 0 - 57
patches/react-native-calendar-picker+7.1.4.patch

@@ -1,57 +0,0 @@
-diff --git a/node_modules/react-native-calendar-picker/CalendarPicker/Day.js b/node_modules/react-native-calendar-picker/CalendarPicker/Day.js
-index f79b618..e163c31 100644
---- a/node_modules/react-native-calendar-picker/CalendarPicker/Day.js
-+++ b/node_modules/react-native-calendar-picker/CalendarPicker/Day.js
-@@ -197,15 +197,43 @@ export default function Day(props) {
-       );
-     } else {
-       return (
--        <View style={[styles.dayWrapper, custom.containerStyle]}>
--          <TouchableOpacity
--            disabled={!enableDateChange}
--            style={[custom.style, computedSelectedDayStyle, selectedDayStyle ]}
--            onPress={() => onPressDay({year, month, day}) }>
--            <Text style={[styles.dayLabel, textStyle, custom.textStyle, selectedDayTextStyle]}>
--              { day }
--            </Text>
--          </TouchableOpacity>
-+        <View style={[styles.dayWrapper, custom.containerStyle, {position: 'relative'}]}>
-+          {!(selectedStartDate && !selectedEndDate && isThisDaySameAsSelectedStart) && (
-+            <TouchableOpacity
-+              disabled={!enableDateChange}
-+              style={[custom.style, computedSelectedDayStyle, selectedDayStyle]}
-+              onPress={() => onPressDay({year, month, day}) }>
-+              <Text style={[
-+                styles.dayLabel,
-+                textStyle,
-+                custom.textStyle,
-+                selectedDayTextStyle,
-+                { color: '#0F3F4F' },
-+                (thisDay.isSame(today, 'day') && (isThisDaySameAsSelectedStart || isThisDaySameAsSelectedEnd)) && { borderWidth: 0 }
-+              ]}>
-+                { day }
-+              </Text>
-+            </TouchableOpacity>
-+          )}
-+
-+          {(thisDay.isSame(selectedStartDate, 'day') || thisDay.isSame(selectedEndDate, 'day')) && (
-+            <TouchableOpacity
-+              disabled={!enableDateChange}
-+              style={[{position: 'absolute'}]}
-+              onPress={() => onPressDay({year, month, day}) }>
-+              <Text style={[styles.dayLabel, textStyle, custom.textStyle, selectedDayTextStyle, {
-+                backgroundColor: '#0F3F4F',
-+                borderRadius: 17,
-+                height: 34,
-+                width: 34,
-+                textAlign: 'center',
-+                verticalAlign: 'middle',
-+                overflow: 'hidden',
-+              }]}>
-+                { day }
-+              </Text>
-+            </TouchableOpacity>
-+          )}
-         </View>
-       );
-     }

+ 4 - 1
src/constants/secrets.ts

@@ -1,5 +1,8 @@
 import Constants from 'expo-constants';
 
-export const { API_HOST, MAP_HOST } = Constants.manifest2?.extra?.expoClient?.extra ?? {};
+const { extra } = Constants.manifest2 || Constants.manifest;
+
+export const API_HOST = extra?.API_HOST || Constants?.expoConfig?.extra?.API_HOST;
+export const MAP_HOST = extra?.MAP_HOST || Constants?.expoConfig?.extra?.MAP_HOST;
 
 export const API_URL = `${API_HOST}/webapi`;