update to Expo SDK 50

This commit is contained in:
ak 2024-02-10 15:21:44 -08:00
parent 721603cff3
commit ef3f248779
6 changed files with 1434 additions and 1978 deletions

View file

@ -42,7 +42,7 @@ export default function () {
const StyledText = styled(Text); const StyledText = styled(Text);
const coords = useLocalSearchParams().coords.toString().split("%2B"); const coords = useLocalSearchParams().coords.toString().split("+");
const lon = coords[0]; const lon = coords[0];
const lat = coords[1]; const lat = coords[1];
const utmCoords = toUTM(lat, lon); const utmCoords = toUTM(lat, lon);
@ -84,6 +84,9 @@ export default function () {
setStoreItems(items); setStoreItems(items);
const imageURL = `${process.env.EXPO_PUBLIC_BACKEND_URL}/img?imageKey=${imageKey}`; const imageURL = `${process.env.EXPO_PUBLIC_BACKEND_URL}/img?imageKey=${imageKey}`;
const fetchCheck = await fetch(imageURL, { method: "HEAD" });
const exists = fetchCheck.ok;
if (exists) {
await FileSystem.downloadAsync( await FileSystem.downloadAsync(
imageURL, imageURL,
FileSystem.documentDirectory + imageKey FileSystem.documentDirectory + imageKey
@ -92,7 +95,7 @@ export default function () {
setImage(uri); setImage(uri);
}) })
.catch(() => {}); .catch(() => {});
console.log(image); }
}; };
useEffect(() => { useEffect(() => {

View file

@ -29,7 +29,7 @@ export default function () {
let { coords } = useLocalSearchParams(); let { coords } = useLocalSearchParams();
const handleSubmit = async () => { const handleSubmit = async () => {
coords = coords.split("%2B"); coords = coords.split("+");
const lon = coords[0]; const lon = coords[0];
const lat = coords[1]; const lat = coords[1];
const utmCoords = utm.convertLatLngToUtm(lat, lon, 5); const utmCoords = utm.convertLatLngToUtm(lat, lon, 5);
@ -165,7 +165,7 @@ export default function () {
title: "New Store", title: "New Store",
}} }}
/> />
<TouchableOpacity onPress={() => setImage(uploadImage())}> <TouchableOpacity onPress={async () => setImage(await uploadImage())}>
{image ? ( {image ? (
<Image source={{ uri: image.uri }} className="h-[33vh] w-[100vw]" /> <Image source={{ uri: image.uri }} className="h-[33vh] w-[100vw]" />
) : ( ) : (

View file

@ -3,8 +3,6 @@ module.exports = function (api) {
return { return {
presets: ["babel-preset-expo"], presets: ["babel-preset-expo"],
plugins: [ plugins: [
// Required for expo-router
"expo-router/babel",
// nativewind // nativewind
"nativewind/babel", "nativewind/babel",
], ],

View file

@ -14,6 +14,9 @@
"distribution": "internal", "distribution": "internal",
"env": { "env": {
"EXPO_PUBLIC_BACKEND_URL": "https://beerbuddyapi-1-y1467694.deta.app" "EXPO_PUBLIC_BACKEND_URL": "https://beerbuddyapi-1-y1467694.deta.app"
},
"android": {
"image": "latest"
} }
}, },
"production": { "production": {

File diff suppressed because it is too large Load diff

View file

@ -10,33 +10,33 @@
}, },
"dependencies": { "dependencies": {
"@andordavoti/react-native-timeago": "^0.0.14", "@andordavoti/react-native-timeago": "^0.0.14",
"@expo/vector-icons": "^13.0.0", "@expo/vector-icons": "^14.0.0",
"@react-native-picker/picker": "2.4.10", "@react-native-picker/picker": "2.6.1",
"@react-navigation/native": "^6.0.2", "@react-navigation/native": "^6.0.2",
"expo": "~49.0.18", "expo": "^50.0.6",
"expo-asset": "^8.10.1", "expo-asset": "~9.0.2",
"expo-constants": "^14.4.2", "expo-constants": "~15.4.5",
"expo-file-system": "~15.4.5", "expo-file-system": "~16.0.6",
"expo-font": "~11.4.0", "expo-font": "~11.10.2",
"expo-image-picker": "~14.3.2", "expo-image-picker": "~14.7.1",
"expo-linking": "~5.0.2", "expo-linking": "~6.2.2",
"expo-location": "~16.1.0", "expo-location": "~16.5.3",
"expo-router": "^2.0.0", "expo-router": "~3.4.7",
"expo-splash-screen": "~0.20.5", "expo-splash-screen": "~0.26.4",
"expo-status-bar": "~1.6.0", "expo-status-bar": "~1.11.1",
"expo-system-ui": "~2.4.0", "expo-system-ui": "~2.9.3",
"expo-updates": "~0.18.17", "expo-updates": "~0.24.10",
"expo-web-browser": "~12.3.2", "expo-web-browser": "~12.8.2",
"mime": "^4.0.0", "mime": "^4.0.0",
"nativewind": "^2.0.11", "nativewind": "^2.0.11",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-native": "0.73.1", "react-native": "0.73.4",
"react-native-gesture-handler": "~2.12.0", "react-native-gesture-handler": "~2.14.0",
"react-native-safe-area-context": "4.6.3", "react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.22.0", "react-native-screens": "~3.29.0",
"react-native-web": "~0.19.6", "react-native-web": "~0.19.6",
"react-native-webview": "13.2.2", "react-native-webview": "13.6.4",
"utm-latlng": "^1.0.7" "utm-latlng": "^1.0.7"
}, },
"devDependencies": { "devDependencies": {