Compare commits
No commits in common. "f711c9d610a9857586d09f319eff4088ae7c2b1f" and "dde3256c6eba26cbbb42b9261315ca5543482cfd" have entirely different histories.
f711c9d610
...
dde3256c6e
@ -2,7 +2,6 @@ import React from 'react';
|
|||||||
import {View, Text } from "react-native";
|
import {View, Text } from "react-native";
|
||||||
import { useTheme } from "react-native-paper";
|
import { useTheme } from "react-native-paper";
|
||||||
import Profile from "@/components/Profile";
|
import Profile from "@/components/Profile";
|
||||||
import LocationScreen from "@/components/Location";
|
|
||||||
import Status from "@/components/Status";
|
import Status from "@/components/Status";
|
||||||
import TopNav from "@/components/TopNav";
|
import TopNav from "@/components/TopNav";
|
||||||
import DrawerMenu from "@/components/DrawerMenu";
|
import DrawerMenu from "@/components/DrawerMenu";
|
||||||
@ -32,8 +31,6 @@ const Index = () => {
|
|||||||
setUserName,
|
setUserName,
|
||||||
userImage,
|
userImage,
|
||||||
setUserImage,
|
setUserImage,
|
||||||
park,
|
|
||||||
setPark,
|
|
||||||
userStatus,
|
userStatus,
|
||||||
setUserStatus,
|
setUserStatus,
|
||||||
setUserDataChanged,
|
setUserDataChanged,
|
||||||
@ -66,9 +63,11 @@ const Index = () => {
|
|||||||
aboutVisible={isAboutActive}
|
aboutVisible={isAboutActive}
|
||||||
privacyVisible={isPrivacyActive}
|
privacyVisible={isPrivacyActive}
|
||||||
bugVisible={isBugActive}
|
bugVisible={isBugActive}
|
||||||
|
locationVisible={isLocationActive}
|
||||||
toggleAbout={() => setAboutActive(!isAboutActive)}
|
toggleAbout={() => setAboutActive(!isAboutActive)}
|
||||||
togglePrivacy={() => setPrivacyActive(!isPrivacyActive)}
|
togglePrivacy={() => setPrivacyActive(!isPrivacyActive)}
|
||||||
toggleBug={() => setBugActive(!isBugActive)}
|
toggleBug={() => setBugActive(!isBugActive)}
|
||||||
|
toggleLocation={() => setLocationActive(!isLocationActive)}
|
||||||
/>
|
/>
|
||||||
<TopNav
|
<TopNav
|
||||||
toggleMenu={() => setMenuActive(!isMenuActive)}
|
toggleMenu={() => setMenuActive(!isMenuActive)}
|
||||||
@ -95,14 +94,6 @@ const Index = () => {
|
|||||||
setChanged={setUserDataChanged}
|
setChanged={setUserDataChanged}
|
||||||
onClose={() => setProfileActive(false)}
|
onClose={() => setProfileActive(false)}
|
||||||
/>
|
/>
|
||||||
<LocationScreen
|
|
||||||
visible={isLocationActive}
|
|
||||||
currentTheme={currentTheme}
|
|
||||||
park={park}
|
|
||||||
setPark={setPark}
|
|
||||||
setChanged={setUserDataChanged}
|
|
||||||
onClose={() => setLocationActive(false)}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -3,18 +3,20 @@ import { Portal, Button, Dialog, useTheme } from "react-native-paper";
|
|||||||
import About from "@/components/About";
|
import About from "@/components/About";
|
||||||
import Privacy from "@/components/Privacy";
|
import Privacy from "@/components/Privacy";
|
||||||
import Broken from "@/components/Broken";
|
import Broken from "@/components/Broken";
|
||||||
|
import Location from "@/components/Location";
|
||||||
|
|
||||||
interface DialogsProps {
|
interface DialogsProps {
|
||||||
aboutVisible: boolean;
|
aboutVisible: boolean;
|
||||||
privacyVisible: boolean;
|
privacyVisible: boolean;
|
||||||
bugVisible: boolean;
|
bugVisible: boolean;
|
||||||
|
locationVisible: boolean;
|
||||||
toggleAbout: () => void;
|
toggleAbout: () => void;
|
||||||
togglePrivacy: () => void;
|
togglePrivacy: () => void;
|
||||||
toggleBug: () => void;
|
toggleBug: () => void;
|
||||||
|
toggleLocation: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Dialogs: React.FC<DialogsProps> = ({ aboutVisible, privacyVisible, bugVisible, toggleAbout, togglePrivacy, toggleBug }) => {
|
const Dialogs: React.FC<DialogsProps> = ({ aboutVisible, privacyVisible, bugVisible, locationVisible, toggleAbout, togglePrivacy, toggleBug, toggleLocation }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
<Portal>
|
<Portal>
|
||||||
@ -54,6 +56,18 @@ const Dialogs: React.FC<DialogsProps> = ({ aboutVisible, privacyVisible, bugVisi
|
|||||||
</Button>
|
</Button>
|
||||||
</Dialog.Actions>
|
</Dialog.Actions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
<Dialog visible={locationVisible} onDismiss={() => toggleLocation()}
|
||||||
|
style={{backgroundColor: theme.colors.primaryContainer}}>
|
||||||
|
<Dialog.Title style={{color: theme.colors.primary, textAlign: 'center'}}>Location</Dialog.Title>
|
||||||
|
<Location />
|
||||||
|
<Dialog.Actions style={{justifyContent: "center"}}>
|
||||||
|
<Button onPress={() => toggleLocation()} mode="contained"
|
||||||
|
style={{backgroundColor: theme.colors.inversePrimary}}
|
||||||
|
labelStyle={{color: theme.colors.primary}}>
|
||||||
|
Close
|
||||||
|
</Button>
|
||||||
|
</Dialog.Actions>
|
||||||
|
</Dialog>
|
||||||
</Portal>
|
</Portal>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,84 +1,34 @@
|
|||||||
import React, {useEffect, useState} from "react";
|
import React, { useState } from "react";
|
||||||
import { Dialog, TextInput, useTheme, Button, Text, List, Portal } from "react-native-paper";
|
import { Dialog, TextInput, useTheme, Button, Text } from "react-native-paper";
|
||||||
import { View, FlatList } from "react-native";
|
import { View } from "react-native";
|
||||||
import Slider from "@react-native-community/slider";
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import * as Location from "expo-location";
|
import * as Location from "expo-location";
|
||||||
import log from "@/util/log";
|
import log from "@/util/log"
|
||||||
|
|
||||||
interface LocationScreenProps {
|
|
||||||
visible: boolean;
|
|
||||||
setChanged: (dataChanged: boolean) => void;
|
|
||||||
currentTheme: string;
|
|
||||||
park: string;
|
|
||||||
setPark: (data: string) => void;
|
|
||||||
onClose: () => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Park {
|
|
||||||
Id: string;
|
|
||||||
name: string;
|
|
||||||
address: string;
|
|
||||||
city: string;
|
|
||||||
state: string;
|
|
||||||
zip: string;
|
|
||||||
location: {
|
|
||||||
coordinates: [number, number];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export const API_URL = process.env.EXPO_PUBLIC_API_URL;
|
export const API_URL = process.env.EXPO_PUBLIC_API_URL;
|
||||||
|
|
||||||
const BUTTON_WIDTH = 260;
|
const BUTTON_WIDTH = 260;
|
||||||
|
|
||||||
const LocationScreen: React.FC<LocationScreenProps> = ({ visible, park, setPark, setChanged, onClose }) => {
|
const LocationComponent = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const [zip, setZip] = useState("");
|
const [zip, setZip] = useState("");
|
||||||
const [distance, setDistance] = useState(25);
|
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [locLoading, setLocLoading] = useState(false);
|
const [locLoading, setLocLoading] = useState(false);
|
||||||
const [parks, setParks] = useState<Park[]>([]);
|
|
||||||
const [hasSearched, setHasSearched] = useState(false);
|
|
||||||
const [selectedPark, setSelectedPark] = useState<Park | null>(null);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (visible) {
|
|
||||||
if (park) {
|
|
||||||
setSelectedPark(JSON.parse(park) as Park | null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, [visible]);
|
|
||||||
|
|
||||||
// Call the parks endpoint with coordinates
|
|
||||||
const fetchNearbyParks = async (longitude: number, latitude: number) => {
|
|
||||||
try {
|
|
||||||
const response = await axios.post(API_URL + "/parkLookup", { "Lon": longitude, "Lat": latitude, "Dist": distance });
|
|
||||||
log.debug("Nearby Parks:", response.data);
|
|
||||||
setParks(response.data);
|
|
||||||
} catch (err) {
|
|
||||||
log.error("Nearby Parks Error:", err);
|
|
||||||
setParks([]);
|
|
||||||
} finally {
|
|
||||||
setHasSearched(true);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Zip code handler
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (!zip) return;
|
if (!zip) return;
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
const response = await axios.post(API_URL + "/zipLookup", { zip });
|
const response = await axios.post(API_URL + "/zipLookup", { zip });
|
||||||
log.debug("Zip Lookup Response:", response.data);
|
log.error(response.data);
|
||||||
const longitude = response.data[0];
|
const long = response.data[0];
|
||||||
const latitude = response.data[1];
|
const lat = response.data[1];
|
||||||
await fetchNearbyParks(longitude, latitude);
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.error(err);
|
log.error(err);
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Geolocation handler
|
|
||||||
const handleGetLocation = async () => {
|
const handleGetLocation = async () => {
|
||||||
setLocLoading(true);
|
setLocLoading(true);
|
||||||
try {
|
try {
|
||||||
@ -90,181 +40,67 @@ const LocationScreen: React.FC<LocationScreenProps> = ({ visible, park, setPark,
|
|||||||
}
|
}
|
||||||
let location = await Location.getCurrentPositionAsync({});
|
let location = await Location.getCurrentPositionAsync({});
|
||||||
const { longitude, latitude } = location.coords;
|
const { longitude, latitude } = location.coords;
|
||||||
log.debug([longitude, latitude]);
|
log.error([longitude, latitude]);
|
||||||
await fetchNearbyParks(longitude, latitude);
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.error("Location Error:", err);
|
log.error("Location Error:", err);
|
||||||
}
|
}
|
||||||
setLocLoading(false);
|
setLocLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Render each park item
|
|
||||||
const renderItem = ({ item }: { item: Park }) => (
|
|
||||||
<List.Item
|
|
||||||
title={item.name}
|
|
||||||
description={
|
|
||||||
`${item.address}\n${item.city}, ${item.state} ${item.zip}`
|
|
||||||
}
|
|
||||||
left={props => <List.Icon {...props} icon="paw" />}
|
|
||||||
style={{
|
|
||||||
backgroundColor: theme.colors.surface,
|
|
||||||
borderRadius: 8,
|
|
||||||
marginBottom: 8,
|
|
||||||
elevation: 1,
|
|
||||||
}}
|
|
||||||
titleStyle={{ fontWeight: "bold" }}
|
|
||||||
descriptionNumberOfLines={2}
|
|
||||||
onPress={() => {
|
|
||||||
setSelectedPark(item);
|
|
||||||
const parkString = JSON.stringify(item)
|
|
||||||
if ( park !== parkString ) {
|
|
||||||
setChanged(true);
|
|
||||||
}
|
|
||||||
setPark(parkString);
|
|
||||||
setParks([]);
|
|
||||||
setHasSearched(false);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Portal>
|
<Dialog.Content style={{ maxHeight: 360, justifyContent: "center", alignItems: "center" }}>
|
||||||
<Dialog visible={visible}
|
<View style={{ alignItems: "center", width: "100%" }}>
|
||||||
onDismiss={onClose}
|
<Button
|
||||||
style={{ backgroundColor: theme.colors.background }} >
|
mode="outlined"
|
||||||
<Dialog.Title style={{ color: theme.colors.primary, textAlign: 'center' }}>Location</Dialog.Title>
|
onPress={handleGetLocation}
|
||||||
<Dialog.Content style={{ maxHeight: 500, justifyContent: "center", alignItems: "center" }}>
|
loading={locLoading}
|
||||||
<View style={{ alignItems: "center", width: "100%" }}>
|
disabled={locLoading}
|
||||||
{/* If a park is selected, show only that park info and change button */}
|
style={{ marginBottom: 12, width: BUTTON_WIDTH }}
|
||||||
{selectedPark ? (
|
>
|
||||||
<View style={{ width: BUTTON_WIDTH, alignItems: "center" }}>
|
Use My Location
|
||||||
<List.Item
|
</Button>
|
||||||
title={selectedPark.name}
|
<Text style={{ marginBottom: 12, color: theme.colors.primary, fontWeight: "bold" }}>OR</Text>
|
||||||
description={
|
<View
|
||||||
`${selectedPark.address}\n${selectedPark.city}, ${selectedPark.state} ${selectedPark.zip}`
|
style={{
|
||||||
}
|
flexDirection: "row",
|
||||||
left={props => <List.Icon {...props} icon="paw" />}
|
alignItems: "center",
|
||||||
style={{
|
width: BUTTON_WIDTH,
|
||||||
backgroundColor: theme.colors.surface,
|
justifyContent: "center",
|
||||||
borderRadius: 8,
|
}}
|
||||||
marginBottom: 8,
|
>
|
||||||
elevation: 1,
|
<TextInput
|
||||||
width: "100%"
|
label="Enter Zip Code"
|
||||||
}}
|
mode="outlined"
|
||||||
titleStyle={{ fontWeight: "bold" }}
|
value={zip}
|
||||||
descriptionNumberOfLines={2}
|
onChangeText={setZip}
|
||||||
/>
|
style={{
|
||||||
<Button
|
flex: 3,
|
||||||
mode="outlined"
|
marginRight: 6,
|
||||||
onPress={() => {
|
fontFamily: "SpaceReg",
|
||||||
setSelectedPark(null);
|
minWidth: 0,
|
||||||
setParks([]);
|
}}
|
||||||
setHasSearched(false);
|
placeholderTextColor={theme.colors.primary}
|
||||||
}}
|
textColor={theme.colors.primary}
|
||||||
style={{ marginTop: 16, width: "100%" }}
|
theme={{ colors: { text: theme.colors.primary } }}
|
||||||
>
|
/>
|
||||||
Change Park
|
<Button
|
||||||
</Button>
|
mode="contained"
|
||||||
</View>
|
onPress={handleSubmit}
|
||||||
) : (
|
loading={loading}
|
||||||
// Otherwise show location lookup tools and park list
|
disabled={!zip || loading}
|
||||||
<>
|
style={{
|
||||||
<Button
|
flex: 2,
|
||||||
mode="outlined"
|
minWidth: 0,
|
||||||
onPress={handleGetLocation}
|
height: 50,
|
||||||
loading={locLoading}
|
}}
|
||||||
disabled={locLoading}
|
contentStyle={{ height: 50 }}
|
||||||
style={{ marginBottom: 12, width: BUTTON_WIDTH }}
|
>
|
||||||
>
|
Submit
|
||||||
Use My Location
|
</Button>
|
||||||
</Button>
|
</View>
|
||||||
<Text style={{ marginBottom: 12, color: theme.colors.primary, fontWeight: "bold" }}>OR</Text>
|
</View>
|
||||||
<View style={{
|
</Dialog.Content>
|
||||||
flexDirection: "row",
|
|
||||||
alignItems: "center",
|
|
||||||
width: BUTTON_WIDTH,
|
|
||||||
justifyContent: "center",
|
|
||||||
marginBottom: 4,
|
|
||||||
}}>
|
|
||||||
<TextInput
|
|
||||||
label="Enter Zip Code"
|
|
||||||
mode="outlined"
|
|
||||||
value={zip}
|
|
||||||
onChangeText={setZip}
|
|
||||||
style={{
|
|
||||||
flex: 3,
|
|
||||||
marginRight: 6,
|
|
||||||
fontFamily: "SpaceReg",
|
|
||||||
minWidth: 0,
|
|
||||||
}}
|
|
||||||
placeholderTextColor={theme.colors.primary}
|
|
||||||
textColor={theme.colors.primary}
|
|
||||||
theme={{ colors: { text: theme.colors.primary } }}
|
|
||||||
/>
|
|
||||||
<Button
|
|
||||||
mode="contained"
|
|
||||||
onPress={handleSubmit}
|
|
||||||
loading={loading}
|
|
||||||
disabled={!zip || loading}
|
|
||||||
style={{
|
|
||||||
flex: 2,
|
|
||||||
minWidth: 0,
|
|
||||||
height: 50,
|
|
||||||
}}
|
|
||||||
contentStyle={{ height: 50 }}
|
|
||||||
>
|
|
||||||
Submit
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
<View style={{ width: BUTTON_WIDTH, marginTop: 10, alignItems: "center" }}>
|
|
||||||
<Text style={{ color: theme.colors.primary, marginBottom: 2 }}>
|
|
||||||
Distance: {distance} mile{distance !== 1 ? "s" : ""}
|
|
||||||
</Text>
|
|
||||||
<Slider
|
|
||||||
style={{ width: "100%", height: 36 }}
|
|
||||||
minimumValue={1}
|
|
||||||
maximumValue={40}
|
|
||||||
step={1}
|
|
||||||
value={distance}
|
|
||||||
onValueChange={setDistance}
|
|
||||||
minimumTrackTintColor={theme.colors.primary}
|
|
||||||
maximumTrackTintColor={theme.colors.onSurfaceDisabled || "#ccc"}
|
|
||||||
thumbTintColor={theme.colors.primary}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
{/* Parks List */}
|
|
||||||
{hasSearched && (
|
|
||||||
<View style={{ width: BUTTON_WIDTH, marginTop: 18, maxHeight: 200 }}>
|
|
||||||
<Text style={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
fontSize: 18,
|
|
||||||
marginBottom: parks.length > 0 ? 8 : 2,
|
|
||||||
color: theme.colors.primary
|
|
||||||
}}>
|
|
||||||
Nearby Dogparks
|
|
||||||
</Text>
|
|
||||||
{parks.length > 0 ? (
|
|
||||||
<FlatList
|
|
||||||
data={parks}
|
|
||||||
keyExtractor={(item) => item.Id}
|
|
||||||
renderItem={renderItem}
|
|
||||||
showsVerticalScrollIndicator={false}
|
|
||||||
style={{ maxHeight: 170 }}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<Text style={{ color: theme.colors.onSurface, textAlign: "center", marginTop: 12 }}>
|
|
||||||
No parks found in range.
|
|
||||||
</Text>
|
|
||||||
)}
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</View>
|
|
||||||
</Dialog.Content>
|
|
||||||
</Dialog>
|
|
||||||
</Portal>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default LocationScreen;
|
export default LocationComponent;
|
||||||
|
@ -26,8 +26,6 @@ interface UserContextType {
|
|||||||
setUserName: (name: string) => void;
|
setUserName: (name: string) => void;
|
||||||
userImage: string;
|
userImage: string;
|
||||||
setUserImage: (image: string) => void;
|
setUserImage: (image: string) => void;
|
||||||
park: string;
|
|
||||||
setPark: (park: string) => void;
|
|
||||||
userStatus: string;
|
userStatus: string;
|
||||||
setUserStatus: (status: string) => void;
|
setUserStatus: (status: string) => void;
|
||||||
setUserDataChanged: (changed: boolean) => void;
|
setUserDataChanged: (changed: boolean) => void;
|
||||||
@ -54,7 +52,6 @@ export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
|
|||||||
const [userId, setUserId] = useState("");
|
const [userId, setUserId] = useState("");
|
||||||
const [userName, setUserName] = useState("");
|
const [userName, setUserName] = useState("");
|
||||||
const [userImage, setUserImage] = useState("");
|
const [userImage, setUserImage] = useState("");
|
||||||
const [park, setPark] = useState("");
|
|
||||||
const [userStatus, setUserStatus] = useState("none");
|
const [userStatus, setUserStatus] = useState("none");
|
||||||
const [userDataChanged, setUserDataChanged] = useState(false);
|
const [userDataChanged, setUserDataChanged] = useState(false);
|
||||||
const [isLoading, setIsLoading] = useState(true);
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
@ -68,8 +65,7 @@ export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
|
|||||||
const storedUserName = await AsyncStorage.getItem("userName");
|
const storedUserName = await AsyncStorage.getItem("userName");
|
||||||
const storedUserImage = await AsyncStorage.getItem("userImage");
|
const storedUserImage = await AsyncStorage.getItem("userImage");
|
||||||
const storedUserTheme = await AsyncStorage.getItem("theme");
|
const storedUserTheme = await AsyncStorage.getItem("theme");
|
||||||
const storedPark = await AsyncStorage.getItem("park");
|
log.debug("Stored theme: ", storedUserTheme);
|
||||||
log.debug("Stored park: ", storedPark);
|
|
||||||
if (storedUserId) {
|
if (storedUserId) {
|
||||||
setUserId(storedUserId);
|
setUserId(storedUserId);
|
||||||
setUserName(storedUserName || "");
|
setUserName(storedUserName || "");
|
||||||
@ -83,13 +79,6 @@ export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
|
|||||||
setTheme("blue")
|
setTheme("blue")
|
||||||
setProfileActive(true);
|
setProfileActive(true);
|
||||||
}
|
}
|
||||||
if(storedPark) {
|
|
||||||
setPark(storedPark);
|
|
||||||
setLocationActive(false);
|
|
||||||
} else {
|
|
||||||
setPark("");
|
|
||||||
setLocationActive(true);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error("Error loading user data:", error);
|
log.error("Error loading user data:", error);
|
||||||
} finally {
|
} finally {
|
||||||
@ -109,8 +98,7 @@ export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
|
|||||||
await AsyncStorage.setItem("userName", userName);
|
await AsyncStorage.setItem("userName", userName);
|
||||||
await AsyncStorage.setItem("userImage", userImage);
|
await AsyncStorage.setItem("userImage", userImage);
|
||||||
await AsyncStorage.setItem("theme", currentTheme);
|
await AsyncStorage.setItem("theme", currentTheme);
|
||||||
await AsyncStorage.setItem("park", park);
|
log.debug("Current theme: ", currentTheme);
|
||||||
log.debug("Current park: ", park);
|
|
||||||
setUserDataChanged(false);
|
setUserDataChanged(false);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error("Error saving user data:", error);
|
log.error("Error saving user data:", error);
|
||||||
@ -172,8 +160,6 @@ export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
|
|||||||
setUserName,
|
setUserName,
|
||||||
userImage,
|
userImage,
|
||||||
setUserImage,
|
setUserImage,
|
||||||
park,
|
|
||||||
setPark,
|
|
||||||
userStatus,
|
userStatus,
|
||||||
setUserStatus,
|
setUserStatus,
|
||||||
setUserDataChanged,
|
setUserDataChanged,
|
||||||
|
17
package-lock.json
generated
17
package-lock.json
generated
@ -11,7 +11,6 @@
|
|||||||
"@expo/metro-runtime": "~4.0.1",
|
"@expo/metro-runtime": "~4.0.1",
|
||||||
"@expo/vector-icons": "^14.0.2",
|
"@expo/vector-icons": "^14.0.2",
|
||||||
"@react-native-async-storage/async-storage": "~2.1.1",
|
"@react-native-async-storage/async-storage": "~2.1.1",
|
||||||
"@react-native-community/slider": "^4.5.6",
|
|
||||||
"@react-navigation/bottom-tabs": "^7.2.0",
|
"@react-navigation/bottom-tabs": "^7.2.0",
|
||||||
"@react-navigation/native": "^7.0.14",
|
"@react-navigation/native": "^7.0.14",
|
||||||
"axios": "~1.8.4",
|
"axios": "~1.8.4",
|
||||||
@ -22,7 +21,6 @@
|
|||||||
"expo-haptics": "~14.0.1",
|
"expo-haptics": "~14.0.1",
|
||||||
"expo-image-picker": "~16.0.6",
|
"expo-image-picker": "~16.0.6",
|
||||||
"expo-linking": "~7.0.4",
|
"expo-linking": "~7.0.4",
|
||||||
"expo-location": "^18.0.10",
|
|
||||||
"expo-router": "~4.0.16",
|
"expo-router": "~4.0.16",
|
||||||
"expo-splash-screen": "~0.29.20",
|
"expo-splash-screen": "~0.29.20",
|
||||||
"expo-status-bar": "~2.0.1",
|
"expo-status-bar": "~2.0.1",
|
||||||
@ -3599,12 +3597,6 @@
|
|||||||
"react-native": "^0.0.0-0 || >=0.65 <1.0"
|
"react-native": "^0.0.0-0 || >=0.65 <1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@react-native-community/slider": {
|
|
||||||
"version": "4.5.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/@react-native-community/slider/-/slider-4.5.6.tgz",
|
|
||||||
"integrity": "sha512-UhLPFeqx0YfPLrEz8ffT3uqAyXWu6iqFjohNsbp4cOU7hnJwg2RXtDnYHoHMr7MOkZDVdlLMdrSrAuzY6KGqrg==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@react-native/assets-registry": {
|
"node_modules/@react-native/assets-registry": {
|
||||||
"version": "0.77.1",
|
"version": "0.77.1",
|
||||||
"resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.77.1.tgz",
|
"resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.77.1.tgz",
|
||||||
@ -7316,15 +7308,6 @@
|
|||||||
"react-native": "*"
|
"react-native": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/expo-location": {
|
|
||||||
"version": "18.0.10",
|
|
||||||
"resolved": "https://registry.npmjs.org/expo-location/-/expo-location-18.0.10.tgz",
|
|
||||||
"integrity": "sha512-R0Iioz0UZ9Ts8TACPngh8uDFbajJhVa5/igLqWB8Pq/gp8UHuwj7PC8XbZV7avsFoShYjaxrOhf4U7IONeKLgg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"peerDependencies": {
|
|
||||||
"expo": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/expo-modules-autolinking": {
|
"node_modules/expo-modules-autolinking": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/expo-modules-autolinking/-/expo-modules-autolinking-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/expo-modules-autolinking/-/expo-modules-autolinking-2.0.5.tgz",
|
||||||
|
16
package.json
16
package.json
@ -15,21 +15,15 @@
|
|||||||
"preset": "jest-expo"
|
"preset": "jest-expo"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/metro-runtime": "~4.0.1",
|
|
||||||
"@expo/vector-icons": "^14.0.2",
|
"@expo/vector-icons": "^14.0.2",
|
||||||
"@react-native-async-storage/async-storage": "~2.1.1",
|
|
||||||
"@react-native-community/slider": "^4.5.6",
|
|
||||||
"@react-navigation/bottom-tabs": "^7.2.0",
|
"@react-navigation/bottom-tabs": "^7.2.0",
|
||||||
"@react-navigation/native": "^7.0.14",
|
"@react-navigation/native": "^7.0.14",
|
||||||
"axios": "~1.8.4",
|
|
||||||
"expo": "~52.0.25",
|
"expo": "~52.0.25",
|
||||||
"expo-blur": "~14.0.2",
|
"expo-blur": "~14.0.2",
|
||||||
"expo-constants": "~17.0.4",
|
"expo-constants": "~17.0.4",
|
||||||
"expo-font": "~13.0.3",
|
"expo-font": "~13.0.3",
|
||||||
"expo-haptics": "~14.0.1",
|
"expo-haptics": "~14.0.1",
|
||||||
"expo-image-picker": "~16.0.6",
|
|
||||||
"expo-linking": "~7.0.4",
|
"expo-linking": "~7.0.4",
|
||||||
"expo-location": "^18.0.10",
|
|
||||||
"expo-router": "~4.0.16",
|
"expo-router": "~4.0.16",
|
||||||
"expo-splash-screen": "~0.29.20",
|
"expo-splash-screen": "~0.29.20",
|
||||||
"expo-status-bar": "~2.0.1",
|
"expo-status-bar": "~2.0.1",
|
||||||
@ -41,15 +35,19 @@
|
|||||||
"react-native": "0.77.1",
|
"react-native": "0.77.1",
|
||||||
"react-native-gesture-handler": "~2.20.2",
|
"react-native-gesture-handler": "~2.20.2",
|
||||||
"react-native-logs": "~5.3.0",
|
"react-native-logs": "~5.3.0",
|
||||||
"react-native-paper": "~5.13.1",
|
|
||||||
"react-native-reanimated": "~3.16.1",
|
"react-native-reanimated": "~3.16.1",
|
||||||
"react-native-safe-area-context": "4.12.0",
|
"react-native-safe-area-context": "4.12.0",
|
||||||
"react-native-screens": "~4.4.0",
|
"react-native-screens": "~4.4.0",
|
||||||
"react-native-vector-icons": "~10.2.0",
|
|
||||||
"react-native-web": "~0.19.13",
|
"react-native-web": "~0.19.13",
|
||||||
"react-native-webview": "13.12.5",
|
"react-native-webview": "13.12.5",
|
||||||
"react-use-websocket": "~4.13.0",
|
"react-use-websocket": "~4.13.0",
|
||||||
"uuid": "~11.0.5"
|
"@react-native-async-storage/async-storage": "~2.1.1",
|
||||||
|
"expo-image-picker": "~16.0.6",
|
||||||
|
"axios": "~1.8.4",
|
||||||
|
"uuid": "~11.0.5",
|
||||||
|
"react-native-paper": "~5.13.1",
|
||||||
|
"react-native-vector-icons": "~10.2.0",
|
||||||
|
"@expo/metro-runtime": "~4.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.25.2",
|
"@babel/core": "^7.25.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user