From 64cb7aabdd7f2fee34ab35e6a40f37f7ca56eb97 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Wed, 11 Oct 2023 18:37:53 +0800 Subject: [PATCH 01/43] Fix google map overlay still rendering under open street map in homepage --- src/routes/Home/Home.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 0babfb2..75df31c 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -350,6 +350,7 @@ export default function Home() { return ( <> Date: Wed, 11 Oct 2023 19:33:02 +0800 Subject: [PATCH 02/43] Added loading screen to homepage and proper rendering if location permission is denied --- src/routes/Home/Home.tsx | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 75df31c..3706e68 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -1,5 +1,12 @@ import styles, { colors } from "../../styles"; -import { View, Text, Pressable, ScrollView, Switch } from "react-native"; +import { + View, + Text, + Pressable, + ScrollView, + Switch, + ActivityIndicator, +} from "react-native"; import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer"; import { useState, useEffect } from "react"; import MapView, { Circle, Marker, UrlTile } from "react-native-maps"; @@ -42,6 +49,8 @@ export default function Home() { const map_distance_override = false; const navigation = useNavigation(); const [location, setLocation] = useState(null); + const [locationFetched, setLocationFetched] = useState(false); + const [locationPermitted, setLocationPermitted] = useState(false); const [dist, setDist] = useState(null); const [feedback, setFeedback] = useState( "To continue, please allow Stud-E permission to location services" @@ -55,6 +64,7 @@ export default function Home() { async function requestLocation() { const { status } = await Location.requestForegroundPermissionsAsync(); if (status !== "granted") { + setLocationPermitted(true); setFeedback("Allow location permissions to continue"); toast.show( "Location permission was denied. Please allow in order to use StudE", @@ -68,7 +78,7 @@ export default function Home() { return; } if (status == "granted") { - let newLocation = await Location.getCurrentPositionAsync({}); + let newLocation = await Location.getCurrentPositionAsync(); if (newLocation) { // Only update location state if user's location has changed if ( @@ -105,6 +115,7 @@ export default function Home() { stop_studying.mutate({ active: false, }); + setLocationFetched(true); } // Student Status @@ -345,7 +356,23 @@ export default function Home() { }); function CustomMap() { - if (dist && location) { + if (dist && location && locationFetched) { + if ( + (StudentStatusQuery.isFetching && studying) || + StudentStatusListQuery.isFetching || + StudyGroupQuery.isFetching || + (StudentStatusQuery.isFetching && !studying) || + StudentStatusListGlobalQuery.isFetching || + StudyGroupGlobalQuery.isFetching + ) { + return ( + <> + + + Loading... + + ); + } if (dist <= 1 || map_distance_override) { return ( <> @@ -834,7 +861,7 @@ export default function Home() { } else { return ; } - } else { + } else if (!locationPermitted) { return ( <> {feedback} @@ -843,6 +870,8 @@ export default function Home() { ); + } else { + return <>; } } return ( From 6e63f868050aeb01e65141d5c9a62c09fd74bdf2 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Wed, 11 Oct 2023 19:43:59 +0800 Subject: [PATCH 03/43] Added back button to create group and start studying pages and adding loading indicator for start studying --- src/icons/CaretLeftIcon/CaretLeftIcon.tsx | 28 +++++++++ src/routes/CreateGroup/CreateGroup.tsx | 30 ++++++---- src/routes/StartStudying/StartStudying.tsx | 68 ++++++++++++++-------- 3 files changed, 92 insertions(+), 34 deletions(-) create mode 100644 src/icons/CaretLeftIcon/CaretLeftIcon.tsx diff --git a/src/icons/CaretLeftIcon/CaretLeftIcon.tsx b/src/icons/CaretLeftIcon/CaretLeftIcon.tsx new file mode 100644 index 0000000..e2caaa5 --- /dev/null +++ b/src/icons/CaretLeftIcon/CaretLeftIcon.tsx @@ -0,0 +1,28 @@ +import * as React from "react"; +import { IconProps } from "../../interfaces/Interfaces"; +import { Svg, Path } from "react-native-svg"; +import { colors } from "../../styles"; + +export default function CaretLeftIcon(props: IconProps) { + return ( + <> + + + + + + ); +} diff --git a/src/routes/CreateGroup/CreateGroup.tsx b/src/routes/CreateGroup/CreateGroup.tsx index 0f4ec15..ac54d3d 100644 --- a/src/routes/CreateGroup/CreateGroup.tsx +++ b/src/routes/CreateGroup/CreateGroup.tsx @@ -6,6 +6,7 @@ import { TextInput, NativeSyntheticEvent, TextInputChangeEventData, + Pressable, } from "react-native"; import { useState } from "react"; import { @@ -22,6 +23,7 @@ import { urlProvider } from "../../components/Api/Api"; import MapView, { UrlTile, Marker } from "react-native-maps"; import { useNavigation } from "@react-navigation/native"; import { useToast } from "react-native-toast-notifications"; +import CaretLeftIcon from "../../icons/CaretLeftIcon/CaretLeftIcon"; export default function CreateGroup({ route }: any) { const { location, subject } = route.params; @@ -157,17 +159,23 @@ export default function CreateGroup({ route }: any) { }} /> - + + navigation.navigate("Home")}> + + + + + diff --git a/src/routes/StartStudying/StartStudying.tsx b/src/routes/StartStudying/StartStudying.tsx index 2aa8677..335d674 100644 --- a/src/routes/StartStudying/StartStudying.tsx +++ b/src/routes/StartStudying/StartStudying.tsx @@ -1,6 +1,12 @@ import * as React from "react"; import styles, { Viewport } from "../../styles"; -import { View, Text, ToastAndroid } from "react-native"; +import { + View, + Text, + ToastAndroid, + Pressable, + ActivityIndicator, +} from "react-native"; import { useState } from "react"; import { UserInfoReturnType, @@ -24,6 +30,7 @@ import { urlProvider } from "../../components/Api/Api"; import MapView, { UrlTile, Marker } from "react-native-maps"; import { useNavigation } from "@react-navigation/native"; import { useToast } from "react-native-toast-notifications"; +import CaretLeftIcon from "../../icons/CaretLeftIcon/CaretLeftIcon"; export default function StartStudying({ route }: any) { const { location } = route.params; @@ -90,6 +97,17 @@ export default function StartStudying({ route }: any) { }, }); + if (StudentInfo.isLoading) { + return ( + + + + + Loading... + + + ); + } if (location && location.coords) { return ( @@ -174,28 +192,32 @@ export default function StartStudying({ route }: any) { listMode="MODAL" /> - - + + navigation.navigate("Home")}> + + + + ); From 369a00a0b35a2b7b0a9a9ad5034177a5ed3edf63 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Wed, 11 Oct 2023 19:48:19 +0800 Subject: [PATCH 04/43] Added loading pages inidcators to subject and user info page and redirect login page to homepage if user is already logged in --- src/routes/Login/Login.tsx | 11 +++++++++-- src/routes/SubjectsPage/SubjectsPage.tsx | 14 ++++++++++++-- src/routes/UserInfoPage/UserInfoPage.tsx | 18 +++++++++++++++++- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/src/routes/Login/Login.tsx b/src/routes/Login/Login.tsx index 5a72b1a..b33ef2c 100644 --- a/src/routes/Login/Login.tsx +++ b/src/routes/Login/Login.tsx @@ -7,8 +7,8 @@ import { NativeSyntheticEvent, TextInputChangeEventData, } from "react-native"; -import { useDispatch } from "react-redux"; -import { useState } from "react"; +import { useDispatch, useSelector } from "react-redux"; +import { useEffect, useState } from "react"; import LoginIcon from "../../icons/LoginIcon/LoginIcon"; import Button from "../../components/Button/Button"; import { useNavigation } from "@react-navigation/native"; @@ -22,15 +22,22 @@ import { unsetOnboarding, } from "../../features/redux/slices/StatusSlice/StatusSlice"; import { useToast } from "react-native-toast-notifications"; +import { RootState } from "../../features/redux/Store/Store"; export default function Login() { const navigation = useNavigation(); + const status = useSelector((state: RootState) => state.status); const dispatch = useDispatch(); const [creds, setCreds] = useState({ username: "", password: "", }); const toast = useToast(); + useEffect(() => { + if (status.logged_in) { + navigation.navigate("Home"); + } + }, []); return ( diff --git a/src/routes/SubjectsPage/SubjectsPage.tsx b/src/routes/SubjectsPage/SubjectsPage.tsx index cfee8f7..e7d5905 100644 --- a/src/routes/SubjectsPage/SubjectsPage.tsx +++ b/src/routes/SubjectsPage/SubjectsPage.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import styles from "../../styles"; -import { View, Text } from "react-native"; +import { View, Text, ActivityIndicator } from "react-native"; import { useState } from "react"; import { UserInfoReturnType, @@ -183,7 +183,17 @@ export default function SubjectsPage() { ); } } - + if (StudentInfo.isLoading || Subjects.isLoading) { + return ( + + + + + Loading... + + + ); + } return ( diff --git a/src/routes/UserInfoPage/UserInfoPage.tsx b/src/routes/UserInfoPage/UserInfoPage.tsx index 5d8a49b..129bdd4 100644 --- a/src/routes/UserInfoPage/UserInfoPage.tsx +++ b/src/routes/UserInfoPage/UserInfoPage.tsx @@ -7,6 +7,7 @@ import { NativeSyntheticEvent, TextInputChangeEventData, Pressable, + ActivityIndicator, } from "react-native"; import { useState } from "react"; import { @@ -285,7 +286,22 @@ export default function UserInfoPage() { ); } } - + if ( + StudentInfo.isLoading || + Semesters.isLoading || + yearlevel_query.isLoading || + course_query.isLoading + ) { + return ( + + + + + Loading... + + + ); + } return ( From f9c3a5c5d4c6ae82d82d72573506358cd9b5a2a7 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Wed, 11 Oct 2023 19:50:02 +0800 Subject: [PATCH 05/43] Added possible fix to allow permissions prompt being shown briefly in homepage --- src/routes/Home/Home.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 3706e68..753457b 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -103,6 +103,7 @@ export default function Home() { }); // Refresh when screen loads + requestLocation(); useEffect(() => { requestLocation(); }, []); From ec693a7bb6641c796747762f786a924f5c2f27d6 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Wed, 11 Oct 2023 20:01:22 +0800 Subject: [PATCH 06/43] Fixed loading indicator container size --- .../LoadingFeedback/LoadingFeedback.tsx | 17 +++++++++++++++++ src/routes/SubjectsPage/SubjectsPage.tsx | 13 ++++--------- src/routes/UserInfoPage/UserInfoPage.tsx | 13 ++++--------- 3 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 src/components/LoadingFeedback/LoadingFeedback.tsx diff --git a/src/components/LoadingFeedback/LoadingFeedback.tsx b/src/components/LoadingFeedback/LoadingFeedback.tsx new file mode 100644 index 0000000..eecefad --- /dev/null +++ b/src/components/LoadingFeedback/LoadingFeedback.tsx @@ -0,0 +1,17 @@ +import * as React from "react"; +import styles from "../../styles"; +import { View, Text, ActivityIndicator } from "react-native"; +import { colors } from "../../styles"; +import AnimatedContainer from "../AnimatedContainer/AnimatedContainer"; + +export default function LoadingFeedback() { + return ( + + + + + Loading... + + + ); +} diff --git a/src/routes/SubjectsPage/SubjectsPage.tsx b/src/routes/SubjectsPage/SubjectsPage.tsx index e7d5905..d15515a 100644 --- a/src/routes/SubjectsPage/SubjectsPage.tsx +++ b/src/routes/SubjectsPage/SubjectsPage.tsx @@ -26,6 +26,9 @@ import AnimatedContainerNoScroll from "../../components/AnimatedContainer/Animat import { useSelector } from "react-redux"; import { RootState } from "../../features/redux/Store/Store"; import { useToast } from "react-native-toast-notifications"; +import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer"; +import Loading from "../Loading/Loading"; +import LoadingFeedback from "../../components/LoadingFeedback/LoadingFeedback"; export default function SubjectsPage() { const logged_in_user = useSelector((state: RootState) => state.user.user); @@ -184,15 +187,7 @@ export default function SubjectsPage() { } } if (StudentInfo.isLoading || Subjects.isLoading) { - return ( - - - - - Loading... - - - ); + return ; } return ( diff --git a/src/routes/UserInfoPage/UserInfoPage.tsx b/src/routes/UserInfoPage/UserInfoPage.tsx index 129bdd4..cced0a8 100644 --- a/src/routes/UserInfoPage/UserInfoPage.tsx +++ b/src/routes/UserInfoPage/UserInfoPage.tsx @@ -43,6 +43,9 @@ import { setUser as setUserinState } from "../../features/redux/slices/UserSlice import * as ImagePicker from "expo-image-picker"; import * as FileSystem from "expo-file-system"; import { useToast } from "react-native-toast-notifications"; +import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer"; +import Loading from "../Loading/Loading"; +import LoadingFeedback from "../../components/LoadingFeedback/LoadingFeedback"; export default function UserInfoPage() { const logged_in_user = useSelector((state: RootState) => state.user.user); @@ -292,15 +295,7 @@ export default function UserInfoPage() { yearlevel_query.isLoading || course_query.isLoading ) { - return ( - - - - - Loading... - - - ); + return ; } return ( From 4a406957b5430d3c6c8d6cc67ecab7f898a4a8d4 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Wed, 11 Oct 2023 20:05:01 +0800 Subject: [PATCH 07/43] Added conversation icon --- .../DrawerSettings/CustomDrawerContent.tsx | 3 +- src/icons/MessageIcon/MessageIcon.tsx | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/icons/MessageIcon/MessageIcon.tsx diff --git a/src/components/DrawerSettings/CustomDrawerContent.tsx b/src/components/DrawerSettings/CustomDrawerContent.tsx index f3eb5b8..48c31e2 100644 --- a/src/components/DrawerSettings/CustomDrawerContent.tsx +++ b/src/components/DrawerSettings/CustomDrawerContent.tsx @@ -24,6 +24,7 @@ import SubjectIcon from "../../icons/SubjectIcon/SubjectIcon"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { PatchStudentStatus } from "../Api/Api"; import { useToast } from "react-native-toast-notifications"; +import MessageIcon from "../../icons/MessageIcon/MessageIcon"; export default function CustomDrawerContent(props: {}) { const debug = false; @@ -136,7 +137,7 @@ export default function CustomDrawerContent(props: {}) { navigation.navigate("Conversation"); }} > - + Conversation + + + + + + + + + + ); +} From 963eaef628ab107fe267fc1c37ca41402c8607b2 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Wed, 11 Oct 2023 20:19:16 +0800 Subject: [PATCH 08/43] Rounded edges for MapViews --- src/routes/CreateGroup/CreateGroup.tsx | 86 +++++++++++----------- src/routes/Home/Home.tsx | 4 +- src/routes/StartStudying/StartStudying.tsx | 86 +++++++++++----------- 3 files changed, 91 insertions(+), 85 deletions(-) diff --git a/src/routes/CreateGroup/CreateGroup.tsx b/src/routes/CreateGroup/CreateGroup.tsx index ac54d3d..296b5d8 100644 --- a/src/routes/CreateGroup/CreateGroup.tsx +++ b/src/routes/CreateGroup/CreateGroup.tsx @@ -99,51 +99,53 @@ export default function CreateGroup({ route }: any) { - - - + - + loadingBackgroundColor={colors.secondary_2} + > + + + + - + + + ); diff --git a/src/routes/StartStudying/StartStudying.tsx b/src/routes/StartStudying/StartStudying.tsx index 335d674..fdeeced 100644 --- a/src/routes/StartStudying/StartStudying.tsx +++ b/src/routes/StartStudying/StartStudying.tsx @@ -114,51 +114,53 @@ export default function StartStudying({ route }: any) { - - - + - + loadingBackgroundColor={colors.secondary_2} + > + + + + Date: Fri, 13 Oct 2023 12:21:40 +0800 Subject: [PATCH 09/43] Fixed UserInfo page dropdown menu clipping --- src/routes/UserInfoPage/UserInfoPage.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/routes/UserInfoPage/UserInfoPage.tsx b/src/routes/UserInfoPage/UserInfoPage.tsx index cced0a8..6bf51c0 100644 --- a/src/routes/UserInfoPage/UserInfoPage.tsx +++ b/src/routes/UserInfoPage/UserInfoPage.tsx @@ -350,7 +350,7 @@ export default function UserInfoPage() { Date: Fri, 13 Oct 2023 12:45:55 +0800 Subject: [PATCH 10/43] Added stop-gaps to help with refreshing queries on slower connections and increased refresh interval for homepage from 15 seconds to 10 seconds --- src/routes/CreateGroup/CreateGroup.tsx | 8 ++++++-- src/routes/Home/Home.tsx | 4 ++-- src/routes/StartStudying/StartStudying.tsx | 7 ++++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/routes/CreateGroup/CreateGroup.tsx b/src/routes/CreateGroup/CreateGroup.tsx index 296b5d8..904d472 100644 --- a/src/routes/CreateGroup/CreateGroup.tsx +++ b/src/routes/CreateGroup/CreateGroup.tsx @@ -43,7 +43,6 @@ export default function CreateGroup({ route }: any) { onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["user"] }); queryClient.invalidateQueries({ queryKey: ["user_status"] }); - queryClient.invalidateQueries({ queryKey: ["study_group_list"] }); student_status_patch.mutate({ study_group: name, }); @@ -75,13 +74,18 @@ export default function CreateGroup({ route }: any) { onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["user"] }); queryClient.invalidateQueries({ queryKey: ["user_status"] }); + queryClient.invalidateQueries({ queryKey: ["user_status_list"] }); + queryClient.invalidateQueries({ queryKey: ["study_group_list"] }); toast.show(`Joined group ${name} successfully`, { type: "success", placement: "top", duration: 2000, animationType: "slide-in", }); - navigation.navigate("Home"); + // Set a delay before going back to homepage to hopefully let the queries refresh in time + setTimeout(() => { + navigation.navigate("Home"); + }, 200); }, onError: (error: Error) => { toast.show(String(error), { diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 81c4ec9..52dcd3f 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -93,11 +93,11 @@ export default function Home() { } } - // Refresh every 15 seconds + // Refresh every 10 seconds useEffect(() => { const interval = setInterval(() => { requestLocation(); - }, 15000); + }, 10000); return () => clearInterval(interval); }); diff --git a/src/routes/StartStudying/StartStudying.tsx b/src/routes/StartStudying/StartStudying.tsx index fdeeced..1656482 100644 --- a/src/routes/StartStudying/StartStudying.tsx +++ b/src/routes/StartStudying/StartStudying.tsx @@ -79,13 +79,18 @@ export default function StartStudying({ route }: any) { onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["user"] }); queryClient.invalidateQueries({ queryKey: ["user_status"] }); + queryClient.invalidateQueries({ queryKey: ["user_status_list"] }); + queryClient.invalidateQueries({ queryKey: ["study_group_list"] }); toast.show("You are now studying \n" + selected_subject, { type: "success", placement: "top", duration: 2000, animationType: "slide-in", }); - navigation.navigate("Home"); + // Set a delay before going back to homepage to hopefully let the queries refresh in time + setTimeout(() => { + navigation.navigate("Home"); + }, 200); }, onError: (error: Error) => { toast.show(String(error), { From 02eabd2b41e5504e1ca4e65a3274d66fe0fa4b9f Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 13 Oct 2023 13:56:05 +0800 Subject: [PATCH 11/43] Fixed loading screen in start studying page --- src/routes/StartStudying/StartStudying.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/StartStudying/StartStudying.tsx b/src/routes/StartStudying/StartStudying.tsx index 1656482..157c2b6 100644 --- a/src/routes/StartStudying/StartStudying.tsx +++ b/src/routes/StartStudying/StartStudying.tsx @@ -31,6 +31,7 @@ import MapView, { UrlTile, Marker } from "react-native-maps"; import { useNavigation } from "@react-navigation/native"; import { useToast } from "react-native-toast-notifications"; import CaretLeftIcon from "../../icons/CaretLeftIcon/CaretLeftIcon"; +import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer"; export default function StartStudying({ route }: any) { const { location } = route.params; @@ -105,11 +106,11 @@ export default function StartStudying({ route }: any) { if (StudentInfo.isLoading) { return ( - + Loading... - + ); } From 0c9f53b84dd738b3170a6ff8f27e2d4eea33359c Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 13 Oct 2023 14:01:11 +0800 Subject: [PATCH 12/43] Added refresh button to homepage and made it possible to join and leave groups from list view --- src/icons/RefreshIcon/RefreshIcon.tsx | 26 ++++++ src/routes/Home/Home.tsx | 118 ++++++++++++++++++++------ 2 files changed, 119 insertions(+), 25 deletions(-) create mode 100644 src/icons/RefreshIcon/RefreshIcon.tsx diff --git a/src/icons/RefreshIcon/RefreshIcon.tsx b/src/icons/RefreshIcon/RefreshIcon.tsx new file mode 100644 index 0000000..0a77560 --- /dev/null +++ b/src/icons/RefreshIcon/RefreshIcon.tsx @@ -0,0 +1,26 @@ +import * as React from "react"; +import { IconProps } from "../../interfaces/Interfaces"; + +import { Svg, Path } from "react-native-svg"; +import { colors } from "../../styles"; + +export default function RefreshIcon(props: IconProps) { + return ( + <> + + + + + + + ); +} diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 52dcd3f..27282cf 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -43,6 +43,7 @@ import GetDistanceFromUSTP from "../../components/GetDistance/GetDistanceFromUST import Modal from "react-native-modal"; import DropdownIcon from "../../icons/CaretDownIcon/CaretDownIcon"; import CaretUpIcon from "../../icons/CaretUpIcon/CaretUpIcon"; +import RefreshIcon from "../../icons/RefreshIcon/RefreshIcon"; export default function Home() { // Switch this condition to see the main map when debugging @@ -64,7 +65,6 @@ export default function Home() { async function requestLocation() { const { status } = await Location.requestForegroundPermissionsAsync(); if (status !== "granted") { - setLocationPermitted(true); setFeedback("Allow location permissions to continue"); toast.show( "Location permission was denied. Please allow in order to use StudE", @@ -78,6 +78,10 @@ export default function Home() { return; } if (status == "granted") { + if (locationPermitted === false) { + setLocationPermitted(true); + } + let newLocation = await Location.getCurrentPositionAsync(); if (newLocation) { // Only update location state if user's location has changed @@ -357,26 +361,51 @@ export default function Home() { }); function CustomMap() { - if (dist && location && locationFetched) { - if ( - (StudentStatusQuery.isFetching && studying) || - StudentStatusListQuery.isFetching || - StudyGroupQuery.isFetching || - (StudentStatusQuery.isFetching && !studying) || - StudentStatusListGlobalQuery.isFetching || - StudyGroupGlobalQuery.isFetching - ) { - return ( - <> - - - Loading... - - ); - } + if ( + (StudentStatusQuery.isFetching && studying) || + StudentStatusListQuery.isFetching || + StudyGroupQuery.isFetching || + (StudentStatusQuery.isFetching && !studying) || + StudentStatusListGlobalQuery.isFetching || + StudyGroupGlobalQuery.isFetching + ) { + return ( + <> + + + Loading... + + ); + } else if (!locationPermitted) { + console.log(locationPermitted); + return ( + <> + {feedback} + + + ); + } else if (dist && location && locationFetched) { if (dist <= 1 || map_distance_override) { return ( <> + + { + queryClient.invalidateQueries({ queryKey: ["user"] }); + queryClient.invalidateQueries({ queryKey: ["user_status"] }); + queryClient.invalidateQueries({ + queryKey: ["user_status_list"], + }); + queryClient.invalidateQueries({ + queryKey: ["study_group_list"], + }); + }} + > + + + ; } - } else if (!locationPermitted) { + } else { return ( <> - {feedback} - + + + Loading... ); - } else { - return <>; } } return ( @@ -970,6 +996,47 @@ export default function Home() { ) : ( <> )} + {student_status?.study_group != studygroup.name ? ( + { + change_study_group.mutate({ + study_group: studygroup.name, + subject: studygroup.subject, + }); + setModalOpen(!modalOpen); + }} + > + + Join Group + + + ) : ( + <> + )} + {student_status?.study_group == studygroup.name ? ( + { + change_study_group.mutate({ + study_group: "", + }); + setModalOpen(!modalOpen); + }} + > + + Leave Group + + + ) : ( + <> + )} ); }) @@ -979,6 +1046,7 @@ export default function Home() { + From 8e5e0546df38cc851f094bee3e31335d81426482 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 13 Oct 2023 14:06:04 +0800 Subject: [PATCH 13/43] Align own user messages to the right and other user messages to the left --- src/routes/ConversationPage/ConversationPage.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/routes/ConversationPage/ConversationPage.tsx b/src/routes/ConversationPage/ConversationPage.tsx index fdba4cf..b2fd297 100644 --- a/src/routes/ConversationPage/ConversationPage.tsx +++ b/src/routes/ConversationPage/ConversationPage.tsx @@ -34,9 +34,12 @@ import { useToast } from "react-native-toast-notifications"; import { useQueryClient } from "@tanstack/react-query"; import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer"; import AsyncStorage from "@react-native-async-storage/async-storage"; +import { useSelector } from "react-redux"; +import { RootState } from "../../features/redux/Store/Store"; export default function ConversationPage() { const toast = useToast(); + const user = useSelector((state: RootState) => state.user); // Student Status const [student_status, setStudentStatus] = useState(); const StudentStatusQuery = useQuery({ @@ -248,7 +251,10 @@ export default function ConversationPage() { key={message.id} style={{ ...styles.message_contentContainer, - alignItems: index % 2 == 0 ? "flex-end" : "flex-start", + alignItems: + message.user === user.user.username + ? "flex-end" + : "flex-start", }} > From 4caf86c6be7deaab2321aae5b3a8fbbe19e68cfa Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 13 Oct 2023 14:28:22 +0800 Subject: [PATCH 14/43] Fixed map elements not rendering on first open when on poor network conditions --- src/routes/Home/Home.tsx | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 27282cf..66a5727 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -91,25 +91,30 @@ export default function Home() { newLocation.coords.longitude !== location.coords.longitude ) { setLocation(newLocation); - DistanceHandler(newLocation); + await DistanceHandler(newLocation); } } } } - // Refresh every 10 seconds + // Refresh when screen loads & every 10 seconds + requestLocation(); useEffect(() => { const interval = setInterval(() => { requestLocation(); }, 10000); - - return () => clearInterval(interval); - }); - - // Refresh when screen loads - requestLocation(); - useEffect(() => { + setTimeout(() => { + queryClient.invalidateQueries({ queryKey: ["user"] }); + queryClient.invalidateQueries({ queryKey: ["user_status"] }); + queryClient.invalidateQueries({ + queryKey: ["user_status_list"], + }); + queryClient.invalidateQueries({ + queryKey: ["study_group_list"], + }); + }, 2000); requestLocation(); + return () => clearInterval(interval); }, []); async function DistanceHandler(location: RawLocationType) { From a11ff2ee6fc5608885be58606ce1a40032b58287 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sat, 14 Oct 2023 10:35:28 +0800 Subject: [PATCH 15/43] Reverted query invalidation on mount in homepage as it was causing performance issues --- src/routes/Home/Home.tsx | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 66a5727..eaa3866 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -97,34 +97,28 @@ export default function Home() { } } - // Refresh when screen loads & every 10 seconds + // Refresh every 10 seconds requestLocation(); useEffect(() => { const interval = setInterval(() => { requestLocation(); }, 10000); - setTimeout(() => { - queryClient.invalidateQueries({ queryKey: ["user"] }); - queryClient.invalidateQueries({ queryKey: ["user_status"] }); - queryClient.invalidateQueries({ - queryKey: ["user_status_list"], - }); - queryClient.invalidateQueries({ - queryKey: ["study_group_list"], - }); - }, 2000); - requestLocation(); return () => clearInterval(interval); }, []); + const [stopping_toofar, setStopping] = useState(false); async function DistanceHandler(location: RawLocationType) { let dist = GetDistanceFromUSTP(location.coords); setDist(dist); // Deactivate student status if too far away and still studying - if (dist >= 2 && !map_distance_override && studying) - stop_studying.mutate({ - active: false, - }); + if (dist >= 2 && !map_distance_override && studying) { + if (!stopping_toofar) { + stop_studying.mutate({ + active: false, + }); + } + setStopping(true); + } setLocationFetched(true); } @@ -196,6 +190,9 @@ export default function Home() { }, 500); setStudyGroups([]); setStudying(false); + if (stopping_toofar) { + setStopping(false); + } }, onError: (error: Error) => { toast.show(String(error), { From 22820e139e9eb92123cae5cda5cba5b6596c8ab8 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sat, 14 Oct 2023 10:51:28 +0800 Subject: [PATCH 16/43] Move conditional statements in homepage --- src/routes/Home/Home.tsx | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index eaa3866..dadb0b2 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -363,22 +363,7 @@ export default function Home() { }); function CustomMap() { - if ( - (StudentStatusQuery.isFetching && studying) || - StudentStatusListQuery.isFetching || - StudyGroupQuery.isFetching || - (StudentStatusQuery.isFetching && !studying) || - StudentStatusListGlobalQuery.isFetching || - StudyGroupGlobalQuery.isFetching - ) { - return ( - <> - - - Loading... - - ); - } else if (!locationPermitted) { + if (!locationPermitted) { console.log(locationPermitted); return ( <> @@ -390,6 +375,22 @@ export default function Home() { ); } else if (dist && location && locationFetched) { if (dist <= 1 || map_distance_override) { + if ( + (StudentStatusQuery.isFetching && studying) || + StudentStatusListQuery.isFetching || + StudyGroupQuery.isFetching || + (StudentStatusQuery.isFetching && !studying) || + StudentStatusListGlobalQuery.isFetching || + StudyGroupGlobalQuery.isFetching + ) { + return ( + <> + + + Loading... + + ); + } return ( <> From de33fe30fd72d127b25c60c5f954b63863f9a1db Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sat, 14 Oct 2023 11:12:16 +0800 Subject: [PATCH 17/43] Remvoe locationFetched variable as it seemed to cause performance issues with rerenders --- src/routes/Home/Home.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index dadb0b2..2044956 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -50,7 +50,6 @@ export default function Home() { const map_distance_override = false; const navigation = useNavigation(); const [location, setLocation] = useState(null); - const [locationFetched, setLocationFetched] = useState(false); const [locationPermitted, setLocationPermitted] = useState(false); const [dist, setDist] = useState(null); const [feedback, setFeedback] = useState( @@ -103,6 +102,17 @@ export default function Home() { const interval = setInterval(() => { requestLocation(); }, 10000); + setTimeout(() => { + queryClient.invalidateQueries({ queryKey: ["user"] }); + queryClient.invalidateQueries({ queryKey: ["user_status"] }); + queryClient.invalidateQueries({ + queryKey: ["user_status_list"], + }); + queryClient.invalidateQueries({ + queryKey: ["study_group_list"], + }); + }, 2000); + requestLocation(); return () => clearInterval(interval); }, []); @@ -119,7 +129,6 @@ export default function Home() { } setStopping(true); } - setLocationFetched(true); } // Student Status @@ -364,7 +373,6 @@ export default function Home() { function CustomMap() { if (!locationPermitted) { - console.log(locationPermitted); return ( <> {feedback} @@ -373,7 +381,7 @@ export default function Home() { ); - } else if (dist && location && locationFetched) { + } else if (dist && location) { if (dist <= 1 || map_distance_override) { if ( (StudentStatusQuery.isFetching && studying) || From 8867306bd055b68d213cdcd4b32dd9f6efcd9099 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 15 Oct 2023 11:44:31 +0800 Subject: [PATCH 18/43] Made button visually responsive on pressing --- src/components/Button/Button.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index ee36630..dce7823 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -17,7 +17,10 @@ export default function Button({ disabled = false, ...props }: props) { [ + styles.button_template, + { backgroundColor: pressed ? colors.primary_2 : props.color }, + ]} > {props.children} From be216896393efd4595f2adf8db47329ecebdbb70 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 15 Oct 2023 11:54:48 +0800 Subject: [PATCH 19/43] Added confirm password field --- src/routes/Register/Register.tsx | 98 +++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 34 deletions(-) diff --git a/src/routes/Register/Register.tsx b/src/routes/Register/Register.tsx index c563f26..03ed006 100644 --- a/src/routes/Register/Register.tsx +++ b/src/routes/Register/Register.tsx @@ -23,6 +23,7 @@ export default function Register() { const toast = useToast(); // const dispatch = useDispatch(); // const creds = useSelector((state: RootState) => state.auth.creds); + const [registering, setRegistering] = useState(false); const [user, setUser] = useState({ first_name: "", last_name: "", @@ -30,6 +31,7 @@ export default function Register() { username: "", email: "", password: "", + confirm_password: "", }); return ( @@ -121,49 +123,77 @@ export default function Register() { }} /> + + ): void => { + setUser({ ...user, confirm_password: e.nativeEvent.text }); + }} + /> + ); + } else if ( + (StudentStatusQuery.isFetching && studying) || + StudentStatusListQuery.isFetching || + StudyGroupQuery.isFetching || + (StudentStatusQuery.isFetching && !studying) || + StudentStatusListGlobalQuery.isFetching || + StudyGroupGlobalQuery.isFetching + ) { + return ( + <> + + + Loading... + + ); } else if (dist && location) { - if ( - (StudentStatusQuery.isFetching && studying) || - StudentStatusListQuery.isFetching || - StudyGroupQuery.isFetching || - (StudentStatusQuery.isFetching && !studying) || - StudentStatusListGlobalQuery.isFetching || - StudyGroupGlobalQuery.isFetching - ) { - return ( - <> - - - Loading... - - ); - } else if (dist <= 1 || map_distance_override) { + if (dist <= 1 || map_distance_override) { return ( <> From e501bc2c91a28e9aebc8055b40d407404c84b138 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 15 Oct 2023 12:57:44 +0800 Subject: [PATCH 23/43] Hotfix on incorrect condition on login button --- src/routes/Login/Login.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/Login/Login.tsx b/src/routes/Login/Login.tsx index 9aa4422..7ff7900 100644 --- a/src/routes/Login/Login.tsx +++ b/src/routes/Login/Login.tsx @@ -77,7 +77,7 @@ export default function Login() { + ) : ( + <> + )} ); From a0d27aaa38be71e3aa2e529b9b94c344fb825e7f Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Thu, 19 Oct 2023 18:53:54 +0800 Subject: [PATCH 25/43] Convert onboarding dropdown menus into modals --- src/routes/Onboarding/Onboarding.tsx | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/routes/Onboarding/Onboarding.tsx b/src/routes/Onboarding/Onboarding.tsx index 89952de..cd42ee4 100644 --- a/src/routes/Onboarding/Onboarding.tsx +++ b/src/routes/Onboarding/Onboarding.tsx @@ -195,7 +195,13 @@ export default function Onboarding() { ...styles.text_white_small_bold, ...{ textAlign: "center" }, }} - dropDownContainerStyle={{ backgroundColor: colors.primary_2 }} + modalContentContainerStyle={{ + backgroundColor: colors.primary_2, + borderWidth: 0, + zIndex: 1000, + }} + dropDownDirection="BOTTOM" + listMode="MODAL" /> Date: Thu, 19 Oct 2023 20:03:41 +0800 Subject: [PATCH 26/43] Move refresh button to the bottom alongside studying and group create buttons --- src/routes/Home/Home.tsx | 48 ++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 26102d6..4473887 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -398,22 +398,6 @@ export default function Home() { if (dist <= 1 || map_distance_override) { return ( <> - - { - queryClient.invalidateQueries({ queryKey: ["user"] }); - queryClient.invalidateQueries({ queryKey: ["user_status"] }); - queryClient.invalidateQueries({ - queryKey: ["user_status_list"], - }); - queryClient.invalidateQueries({ - queryKey: ["study_group_list"], - }); - }} - > - - - {buttonLabel} + + { + queryClient.invalidateQueries({ queryKey: ["user"] }); + queryClient.invalidateQueries({ + queryKey: ["user_status"], + }); + queryClient.invalidateQueries({ + queryKey: ["user_status_list"], + }); + queryClient.invalidateQueries({ + queryKey: ["study_group_list"], + }); + toast.show("Refreshed", { + type: "success", + placement: "top", + duration: 2000, + animationType: "slide-in", + }); + }} + > + + + Date: Thu, 19 Oct 2023 20:04:37 +0800 Subject: [PATCH 27/43] Add spacing between entries in list view --- src/routes/Home/Home.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 4473887..9ee173d 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -986,6 +986,7 @@ export default function Home() { borderWidth: 1, borderRadius: 16, width: 256, + marginVertical: 4, }} > @@ -1018,6 +1019,7 @@ export default function Home() { borderWidth: 1, borderRadius: 16, width: 256, + marginVertical: 4, }} > From 6564b52dc0bfa87f50ba78df765ab5034382550f Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 22 Oct 2023 00:57:01 +0800 Subject: [PATCH 28/43] Bump expo version --- package-lock.json | 1403 ++------------------------------------------- package.json | 2 +- 2 files changed, 35 insertions(+), 1370 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4090833..9820066 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "moment": "^2.29.4", "moti": "^0.25.3", "react": "18.2.0", - "react-native": "0.71.13", + "react-native": "0.71.14", "react-native-bouncy-checkbox": "^3.0.7", "react-native-dropdown-picker": "^5.4.6", "react-native-gesture-handler": "~2.9.0", @@ -393,9 +393,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", "engines": { "node": ">=6.9.0" } @@ -1866,12 +1866,12 @@ } }, "node_modules/@babel/preset-flow": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.22.5.tgz", - "integrity": "sha512-ta2qZ+LSiGCrP5pgcGt8xMnnkXQrq8Sa4Ulhy06BOlF5QbLw9q5hIx7bn5MrsvyTGAfh6kTOo07Q+Pfld/8Y5Q==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.22.15.tgz", + "integrity": "sha512-dB5aIMqpkgbTfN5vDdTRPzjqtWiZcRESNR88QYnoPR+bmdYoluOzMX9tQerTv0XzSgZYctPfO1oc0N5zdog1ew==", "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.5", + "@babel/helper-validator-option": "^7.22.15", "@babel/plugin-transform-flow-strip-types": "^7.22.5" }, "engines": { @@ -1915,9 +1915,9 @@ } }, "node_modules/@babel/register": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.22.5.tgz", - "integrity": "sha512-vV6pm/4CijSQ8Y47RH5SopXzursN35RQINfGJkmOlcpAtGuf94miFvIPhCKGQN7WGIcsgG1BHEX2KVdTYwTwUQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.22.15.tgz", + "integrity": "sha512-V3Q3EqoQdn65RCgTLwauZaTfd1ShhwPmbBv+1dkZV/HpCGMKVyn6oFcRlI7RaKqiDQjX2Qd3AuoEguBgdjIKlg==", "dependencies": { "clone-deep": "^4.0.1", "find-cache-dir": "^2.0.0", @@ -5436,30 +5436,6 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -5468,14 +5444,6 @@ "node": ">=8" } }, - "node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -5493,18 +5461,10 @@ "util": "^0.12.5" } }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ast-types": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.14.2.tgz", - "integrity": "sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.15.2.tgz", + "integrity": "sha512-c27loCv9QkZinsa5ProX751khO9DJl/AcB5c2KNtA6NRvHKS0PgLfcftz72KVq504vB0Gku5s2kUZzDBvQWvHg==", "dependencies": { "tslib": "^2.0.1" }, @@ -5543,17 +5503,6 @@ "node": ">= 4.0.0" } }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, "node_modules/available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", @@ -5718,34 +5667,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -6089,25 +6010,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, - "node_modules/cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -6223,96 +6125,6 @@ "node": ">=8" } }, - "node_modules/class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dependencies": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -6428,18 +6240,6 @@ "node": ">=6" } }, - "node_modules/collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", - "dependencies": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/color": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", @@ -6529,11 +6329,6 @@ "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==" }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" - }, "node_modules/component-type": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-type/-/component-type-1.2.1.tgz", @@ -6633,14 +6428,6 @@ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, - "node_modules/copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/core-js-compat": { "version": "3.31.0", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.31.0.tgz", @@ -6896,18 +6683,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/del": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", @@ -7223,131 +6998,6 @@ "node": ">=6" } }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", - "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, "node_modules/expo": { "version": "48.0.19", "resolved": "https://registry.npmjs.org/expo/-/expo-48.0.19.tgz", @@ -7691,66 +7341,6 @@ "expo": "*" } }, - "node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -8004,14 +7594,6 @@ "is-callable": "^1.1.3" } }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/form-data": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", @@ -8025,17 +7607,6 @@ "node": ">= 6" } }, - "node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", - "dependencies": { - "map-cache": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/framer-motion": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz", @@ -8176,14 +7747,6 @@ "node": ">=6" } }, - "node_modules/get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/getenv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/getenv/-/getenv-1.0.0.tgz", @@ -8353,64 +7916,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", - "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", - "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/hermes-estree": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.8.0.tgz", @@ -8674,17 +8179,6 @@ "node": ">= 0.10" } }, - "node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-arguments": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", @@ -8732,30 +8226,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-directory": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", @@ -8778,17 +8248,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -8978,14 +8437,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -9658,9 +9109,9 @@ "integrity": "sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q==" }, "node_modules/jscodeshift": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.13.1.tgz", - "integrity": "sha512-lGyiEbGOvmMRKgWk4vf+lUrCWO/8YR8sUR3FKF1Cq5fovjZDlIcw3Hu5ppLHAnEXshVffvaM0eyuY/AbOeYpnQ==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.14.0.tgz", + "integrity": "sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA==", "dependencies": { "@babel/core": "^7.13.16", "@babel/parser": "^7.13.16", @@ -9675,10 +9126,10 @@ "chalk": "^4.1.2", "flow-parser": "0.*", "graceful-fs": "^4.2.4", - "micromatch": "^3.1.10", + "micromatch": "^4.0.4", "neo-async": "^2.5.0", "node-dir": "^0.1.17", - "recast": "^0.20.4", + "recast": "^0.21.0", "temp": "^0.8.4", "write-file-atomic": "^2.3.0" }, @@ -9703,37 +9154,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jscodeshift/node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/jscodeshift/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -9765,31 +9185,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/jscodeshift/node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/jscodeshift/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -9798,59 +9193,6 @@ "node": ">=8" } }, - "node_modules/jscodeshift/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/jscodeshift/node_modules/rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -9884,18 +9226,6 @@ "node": ">=6.0.0" } }, - "node_modules/jscodeshift/node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -10078,9 +9408,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } @@ -10093,25 +9423,6 @@ "tmpl": "1.0.5" } }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", - "dependencies": { - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/match-sorter": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/match-sorter/-/match-sorter-6.3.1.tgz", @@ -11172,18 +10483,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", @@ -11296,27 +10595,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ncp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", @@ -11484,84 +10762,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", - "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", @@ -11593,17 +10793,6 @@ "node": ">= 0.4" } }, - "node_modules/object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", - "dependencies": { - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object.assign": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", @@ -11621,17 +10810,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/oblivious-set": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.0.0.tgz", @@ -11821,14 +10999,6 @@ "node": ">= 0.8" } }, - "node_modules/pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/password-prompt": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/password-prompt/-/password-prompt-1.1.2.tgz", @@ -12069,14 +11239,6 @@ "tslib": "^2.1.0" } }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -12368,9 +11530,9 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, "node_modules/react-native": { - "version": "0.71.13", - "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.71.13.tgz", - "integrity": "sha512-zEa69YQNLdv8Sf5Pn0CNDB1K9eGuNy1KoMNxXlrZ89JZ8d02b5hihZIoOCCIwhH+iPgslYwr3ZoGd3AY6FMrgw==", + "version": "0.71.14", + "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.71.14.tgz", + "integrity": "sha512-7uhzas8aKpU2EARhlONt7yiclh+7PXEOJk469ewpQyId8Owq5WNtZvQm/z3k4mHUriMeQ37vgSGkOInSKcCazw==", "dependencies": { "@jest/create-cache-key-function": "^29.2.1", "@react-native-community/cli": "10.2.4", @@ -12397,7 +11559,7 @@ "pretty-format": "^26.5.2", "promise": "^8.3.0", "react-devtools-core": "^4.26.1", - "react-native-codegen": "^0.71.5", + "react-native-codegen": "^0.71.6", "react-native-gradle-plugin": "^0.71.19", "react-refresh": "^0.4.0", "react-shallow-renderer": "^16.15.0", @@ -12436,13 +11598,13 @@ } }, "node_modules/react-native-codegen": { - "version": "0.71.5", - "resolved": "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.71.5.tgz", - "integrity": "sha512-rfsuc0zkuUuMjFnrT55I1mDZ+pBRp2zAiRwxck3m6qeGJBGK5OV5JH66eDQ4aa+3m0of316CqrJDRzVlYufzIg==", + "version": "0.71.6", + "resolved": "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.71.6.tgz", + "integrity": "sha512-e5pR4VldIhEaFctfSAEgxbng0uG4gjBQxAHes3EKLdosH/Av90pQfSe9IDVdFIngvNPzt8Y14pNjrtqov/yNIg==", "dependencies": { "@babel/parser": "^7.14.0", "flow-parser": "^0.185.0", - "jscodeshift": "^0.13.1", + "jscodeshift": "^0.14.0", "nullthrows": "^1.1.1" } }, @@ -12708,11 +11870,11 @@ "integrity": "sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==" }, "node_modules/recast": { - "version": "0.20.5", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.20.5.tgz", - "integrity": "sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.21.5.tgz", + "integrity": "sha512-hjMmLaUXAm1hIuTqOdeYObMslq/q+Xff6QE3Y2P+uoHAg2nmVlLBps2hzh1UJDdMtDTMXOFewK6ky51JQIeECg==", "dependencies": { - "ast-types": "0.14.2", + "ast-types": "0.15.2", "esprima": "~4.0.0", "source-map": "~0.6.1", "tslib": "^2.0.1" @@ -12774,18 +11936,6 @@ "@babel/runtime": "^7.8.4" } }, - "node_modules/regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/regexpu-core": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", @@ -12831,22 +11981,6 @@ "resolved": "https://registry.npmjs.org/remove-trailing-slash/-/remove-trailing-slash-0.1.1.tgz", "integrity": "sha512-o4S4Qh6L2jpnCy83ysZDau+VORNvnFw07CKSAymkd6ICNVEPisMyzlc00KlvvicsxKck94SEwhDnMNdICzO+tA==" }, - "node_modules/repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", - "engines": { - "node": ">=0.10" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -12923,12 +12057,6 @@ "node": ">=8" } }, - "node_modules/resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", - "deprecated": "https://github.com/lydell/resolve-url#deprecated" - }, "node_modules/restore-cursor": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", @@ -12941,14 +12069,6 @@ "node": ">=4" } }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "engines": { - "node": ">=0.12" - } - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -13002,14 +12122,6 @@ "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", "optional": true }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", - "dependencies": { - "ret": "~0.1.10" - } - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -13129,39 +12241,6 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, - "node_modules/set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -13296,186 +12375,6 @@ "node": ">=8.0.0" } }, - "node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dependencies": { - "kind-of": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/snapdragon/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/source-map": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", @@ -13484,19 +12383,6 @@ "node": ">= 8" } }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -13514,12 +12400,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "deprecated": "See https://github.com/lydell/source-map-url#deprecated" - }, "node_modules/split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", @@ -13539,17 +12419,6 @@ "node": ">=6" } }, - "node_modules/split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dependencies": { - "extend-shallow": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -13609,94 +12478,6 @@ "node": ">=8" } }, - "node_modules/static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", - "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -14144,42 +12925,6 @@ "node": ">=4" } }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -14354,28 +13099,6 @@ "resolved": "https://registry.npmjs.org/unimodules-app-loader/-/unimodules-app-loader-4.1.2.tgz", "integrity": "sha512-DLYUCjNpguFhNpxNsBf47NWZi2OjIfWCVQY4f+r4/bwIqFfR7qQd6lXwCFA8EhHS1ti87CBzjMSbIC5bB0J/0Q==" }, - "node_modules/union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/union-value/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", @@ -14428,50 +13151,6 @@ "node": ">= 0.8" } }, - "node_modules/unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", - "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", - "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/update-browserslist-db": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", @@ -14501,12 +13180,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", - "deprecated": "Please see https://github.com/lydell/urix#deprecated" - }, "node_modules/url-join": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", @@ -14521,14 +13194,6 @@ "requires-port": "^1.0.0" } }, - "node_modules/use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/use-latest-callback": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/use-latest-callback/-/use-latest-callback-0.1.6.tgz", diff --git a/package.json b/package.json index a6f2646..0dd96da 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "moment": "^2.29.4", "moti": "^0.25.3", "react": "18.2.0", - "react-native": "0.71.13", + "react-native": "0.71.14", "react-native-bouncy-checkbox": "^3.0.7", "react-native-dropdown-picker": "^5.4.6", "react-native-gesture-handler": "~2.9.0", From 3891f12f5d6fde16d4df7adc6a2b186bbd6592e0 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 27 Oct 2023 20:52:49 +0800 Subject: [PATCH 29/43] Redirect to conversations page instead of homepage when joining or creating a study group --- src/routes/CreateGroup/CreateGroup.tsx | 4 ++-- src/routes/Home/Home.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/routes/CreateGroup/CreateGroup.tsx b/src/routes/CreateGroup/CreateGroup.tsx index 904d472..aee9326 100644 --- a/src/routes/CreateGroup/CreateGroup.tsx +++ b/src/routes/CreateGroup/CreateGroup.tsx @@ -82,9 +82,9 @@ export default function CreateGroup({ route }: any) { duration: 2000, animationType: "slide-in", }); - // Set a delay before going back to homepage to hopefully let the queries refresh in time + // Set a delay before going back to conversation page to hopefully let the queries refresh in time setTimeout(() => { - navigation.navigate("Home"); + navigation.navigate("Conversation"); }, 200); }, onError: (error: Error) => { diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 9ee173d..063b8b3 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -47,7 +47,7 @@ import RefreshIcon from "../../icons/RefreshIcon/RefreshIcon"; export default function Home() { // Switch this condition to see the main map when debugging - const map_distance_override = false; + const map_distance_override = true; const navigation = useNavigation(); const [location, setLocation] = useState(null); const [locationPermitted, setLocationPermitted] = useState(false); @@ -228,6 +228,7 @@ export default function Home() { duration: 2000, animationType: "slide-in", }); + navigation.navigate("Conversation"); } queryClient.invalidateQueries({ queryKey: ["user_status"] }); From bd42b5418e734913ded42bbed9542b2ae350e539 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 27 Oct 2023 21:16:43 +0800 Subject: [PATCH 30/43] Allow register and create group page to be scrollable when onscreen keyboard is open --- src/routes/CreateGroup/CreateGroup.tsx | 5 +++-- src/routes/Register/Register.tsx | 1 + src/styles.tsx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/routes/CreateGroup/CreateGroup.tsx b/src/routes/CreateGroup/CreateGroup.tsx index aee9326..26b30de 100644 --- a/src/routes/CreateGroup/CreateGroup.tsx +++ b/src/routes/CreateGroup/CreateGroup.tsx @@ -24,6 +24,7 @@ import MapView, { UrlTile, Marker } from "react-native-maps"; import { useNavigation } from "@react-navigation/native"; import { useToast } from "react-native-toast-notifications"; import CaretLeftIcon from "../../icons/CaretLeftIcon/CaretLeftIcon"; +import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer"; export default function CreateGroup({ route }: any) { const { location, subject } = route.params; @@ -100,7 +101,7 @@ export default function CreateGroup({ route }: any) { if (location) { return ( - + @@ -183,7 +184,7 @@ export default function CreateGroup({ route }: any) { - + ); } diff --git a/src/routes/Register/Register.tsx b/src/routes/Register/Register.tsx index f9ac188..98a46ce 100644 --- a/src/routes/Register/Register.tsx +++ b/src/routes/Register/Register.tsx @@ -17,6 +17,7 @@ import { UserRegister } from "../../components/Api/Api"; import IsNumber from "../../components/IsNumber/IsNumber"; import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer"; import { useToast } from "react-native-toast-notifications"; +import { ScrollView } from "react-native-gesture-handler"; export default function Register() { const navigation = useNavigation(); diff --git a/src/styles.tsx b/src/styles.tsx index af0d3fa..71beda4 100644 --- a/src/styles.tsx +++ b/src/styles.tsx @@ -44,8 +44,9 @@ const styles = StyleSheet.create({ justifyContent: "center", display: "flex", flexDirection: "column", - flex: 1, + flexGrow: 1, paddingHorizontal: 4, + paddingVertical: 32, }, flex_row: { display: "flex", From 88d8ce05b88719937b212d049b1d27a8ad7fea34 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 27 Oct 2023 21:43:34 +0800 Subject: [PATCH 31/43] Possible fix to race conditions between queries in homepage which resulted in laggy rerenders of map --- src/routes/Home/Home.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 063b8b3..1cbcdc2 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -381,12 +381,14 @@ export default function Home() { ); } else if ( - (StudentStatusQuery.isFetching && studying) || - StudentStatusListQuery.isFetching || - StudyGroupQuery.isFetching || - (StudentStatusQuery.isFetching && !studying) || - StudentStatusListGlobalQuery.isFetching || - StudyGroupGlobalQuery.isFetching + (!StudentStatusQuery.isSuccess && + studying && + !StudentStatusListQuery.isSuccess && + !StudyGroupQuery.isSuccess && + !StudentStatusQuery.isSuccess) || + (!studying && + !StudentStatusListGlobalQuery.isSuccess && + !StudyGroupGlobalQuery.isSuccess) ) { return ( <> From a65a3a84aad94ccff4b07eb26a7989ce79774476 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 27 Oct 2023 22:03:46 +0800 Subject: [PATCH 32/43] Added enter button to conversation page and fixed error not properly displaying when sending an invalid message. Also added refresh interval of 20 seconds to study group query in conversations page to automatically refresh students count --- src/icons/CaretLeftIcon/CaretLeftIcon.tsx | 6 +- src/icons/CaretRightIcon/CaretLeftIcon.tsx | 28 +++++++++ .../ConversationPage/ConversationPage.tsx | 58 +++++++++++++------ 3 files changed, 70 insertions(+), 22 deletions(-) create mode 100644 src/icons/CaretRightIcon/CaretLeftIcon.tsx diff --git a/src/icons/CaretLeftIcon/CaretLeftIcon.tsx b/src/icons/CaretLeftIcon/CaretLeftIcon.tsx index e2caaa5..d6f2c5c 100644 --- a/src/icons/CaretLeftIcon/CaretLeftIcon.tsx +++ b/src/icons/CaretLeftIcon/CaretLeftIcon.tsx @@ -3,7 +3,7 @@ import { IconProps } from "../../interfaces/Interfaces"; import { Svg, Path } from "react-native-svg"; import { colors } from "../../styles"; -export default function CaretLeftIcon(props: IconProps) { +export default function CaretRightIcon(props: IconProps) { return ( <> diff --git a/src/icons/CaretRightIcon/CaretLeftIcon.tsx b/src/icons/CaretRightIcon/CaretLeftIcon.tsx new file mode 100644 index 0000000..e2caaa5 --- /dev/null +++ b/src/icons/CaretRightIcon/CaretLeftIcon.tsx @@ -0,0 +1,28 @@ +import * as React from "react"; +import { IconProps } from "../../interfaces/Interfaces"; +import { Svg, Path } from "react-native-svg"; +import { colors } from "../../styles"; + +export default function CaretLeftIcon(props: IconProps) { + return ( + <> + + + + + + ); +} diff --git a/src/routes/ConversationPage/ConversationPage.tsx b/src/routes/ConversationPage/ConversationPage.tsx index b2fd297..5f433ef 100644 --- a/src/routes/ConversationPage/ConversationPage.tsx +++ b/src/routes/ConversationPage/ConversationPage.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { ActivityIndicator, Image } from "react-native"; +import { ActivityIndicator, Image, Pressable } from "react-native"; import styles from "../../styles"; import { View, @@ -36,6 +36,7 @@ import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContai import AsyncStorage from "@react-native-async-storage/async-storage"; import { useSelector } from "react-redux"; import { RootState } from "../../features/redux/Store/Store"; +import CaretRightIcon from "../../icons/CaretLeftIcon/CaretLeftIcon"; export default function ConversationPage() { const toast = useToast(); @@ -70,6 +71,7 @@ export default function ConversationPage() { enabled: student_status?.study_group != "" && student_status?.study_group != null, queryKey: ["study_group"], + refetchInterval: 20, queryFn: async () => { const data = await GetStudyGroup(student_status?.study_group || ""); if (data[0] == false) { @@ -162,7 +164,7 @@ export default function ConversationPage() { mutationFn: async (info: MessagePostType) => { const data = await PostMessage(info); if (data[0] != true) { - return Promise.reject(new Error()); + return Promise.reject(new Error(data[1])); } return data; }, @@ -293,23 +295,41 @@ export default function ConversationPage() { There are no messages )} - - ): void => { - setMessage(e.nativeEvent.text); - }} - onSubmitEditing={() => { - send_message.mutate({ - message_content: message, - }); - setMessage(""); - }} - /> + + + ): void => { + setMessage(e.nativeEvent.text); + }} + onSubmitEditing={() => { + send_message.mutate({ + message_content: message, + }); + setMessage(""); + }} + /> + { + send_message.mutate({ + message_content: message, + }); + setMessage(""); + }} + > + + + ); From 8a32d2b32ce0cb8aa2f9bd373a57c240b64dfc03 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 27 Oct 2023 22:06:52 +0800 Subject: [PATCH 33/43] Fixed left and right caret icons --- src/icons/CaretLeftIcon/CaretLeftIcon.tsx | 4 ++-- .../{CaretLeftIcon.tsx => CaretRightIcon.tsx} | 2 +- src/routes/ConversationPage/ConversationPage.tsx | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) rename src/icons/CaretRightIcon/{CaretLeftIcon.tsx => CaretRightIcon.tsx} (94%) diff --git a/src/icons/CaretLeftIcon/CaretLeftIcon.tsx b/src/icons/CaretLeftIcon/CaretLeftIcon.tsx index d6f2c5c..eb5655e 100644 --- a/src/icons/CaretLeftIcon/CaretLeftIcon.tsx +++ b/src/icons/CaretLeftIcon/CaretLeftIcon.tsx @@ -18,9 +18,9 @@ export default function CaretRightIcon(props: IconProps) { > diff --git a/src/icons/CaretRightIcon/CaretLeftIcon.tsx b/src/icons/CaretRightIcon/CaretRightIcon.tsx similarity index 94% rename from src/icons/CaretRightIcon/CaretLeftIcon.tsx rename to src/icons/CaretRightIcon/CaretRightIcon.tsx index e2caaa5..eb5655e 100644 --- a/src/icons/CaretRightIcon/CaretLeftIcon.tsx +++ b/src/icons/CaretRightIcon/CaretRightIcon.tsx @@ -3,7 +3,7 @@ import { IconProps } from "../../interfaces/Interfaces"; import { Svg, Path } from "react-native-svg"; import { colors } from "../../styles"; -export default function CaretLeftIcon(props: IconProps) { +export default function CaretRightIcon(props: IconProps) { return ( <> { const data = await GetStudyGroup(student_status?.study_group || ""); if (data[0] == false) { @@ -129,7 +129,7 @@ export default function ConversationPage() { // Avatar List const [users, setUsers] = useState([]); const AvatarsQuery = useQuery({ - refetchInterval: 3000, + refetchInterval: 10000, enabled: student_status?.study_group != null || (student_status?.study_group != "" && @@ -211,7 +211,9 @@ export default function ConversationPage() { paddingRight: 4, }} > - {studygroup.students.length} studying + {!StudyGroupQuery.isFetching + ? studygroup.students.length + " studying" + : "Loading"} {users.map((user: GroupMessageAvatarType, index: number) => { if (index > 6) { From 856621fe06b1916746b4429658ca9e46b042aee3 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 27 Oct 2023 22:16:23 +0800 Subject: [PATCH 34/43] Remove a redundant refresh on load as it prevented users from overriding their location --- src/routes/Home/Home.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 1cbcdc2..bf65cfd 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -97,7 +97,6 @@ export default function Home() { } // Refresh every 10 seconds - requestLocation(); useEffect(() => { const interval = setInterval(() => { requestLocation(); From 5d7327ef267dee69bcc5e7a60c560ae75ec8f9c6 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 27 Oct 2023 23:13:41 +0800 Subject: [PATCH 35/43] Do not redirect to conversations page if leaving a group --- .../DrawerSettings/CustomDrawerContent.tsx | 4 +- src/routes/Home/Home.tsx | 43 +++++++++---------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/components/DrawerSettings/CustomDrawerContent.tsx b/src/components/DrawerSettings/CustomDrawerContent.tsx index 48c31e2..61ec820 100644 --- a/src/components/DrawerSettings/CustomDrawerContent.tsx +++ b/src/components/DrawerSettings/CustomDrawerContent.tsx @@ -27,7 +27,7 @@ import { useToast } from "react-native-toast-notifications"; import MessageIcon from "../../icons/MessageIcon/MessageIcon"; export default function CustomDrawerContent(props: {}) { - const debug = false; + const debug = true; const navigation = useNavigation(); const status = useSelector((state: RootState) => state.status); const dispatch = useDispatch(); @@ -143,7 +143,7 @@ export default function CustomDrawerContent(props: {}) { { // We don't clear student statuses when logging out on debug - if (!debug) { + if (debug) { queryClient.clear(); dispatch(logout()); await AsyncStorage.clear(); diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index bf65cfd..b7c6e12 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -61,7 +61,7 @@ export default function Home() { const [modalOpen, setModalOpen] = useState(false); const [modalByGroup, setModalByGroup] = useState(false); - async function requestLocation() { + async function requestLocationPermission() { const { status } = await Location.requestForegroundPermissionsAsync(); if (status !== "granted") { setFeedback("Allow location permissions to continue"); @@ -75,12 +75,13 @@ export default function Home() { } ); return; + } else { + setLocationPermitted(true); } - if (status == "granted") { - if (locationPermitted === false) { - setLocationPermitted(true); - } + } + async function requestLocation() { + if (locationPermitted) { let newLocation = await Location.getCurrentPositionAsync(); if (newLocation) { // Only update location state if user's location has changed @@ -96,22 +97,18 @@ export default function Home() { } } - // Refresh every 10 seconds useEffect(() => { + console.log("changed"); + console.log(locationPermitted); + requestLocation(); + }, [locationPermitted]); + + useEffect(() => { + requestLocationPermission(); + // Refresh every 30 seconds const interval = setInterval(() => { requestLocation(); }, 30000); - setTimeout(() => { - queryClient.invalidateQueries({ queryKey: ["user"] }); - queryClient.invalidateQueries({ queryKey: ["user_status"] }); - queryClient.invalidateQueries({ - queryKey: ["user_status_list"], - }); - queryClient.invalidateQueries({ - queryKey: ["study_group_list"], - }); - requestLocation(); - }, 2000); return () => clearInterval(interval); }, []); @@ -219,7 +216,7 @@ export default function Home() { return data; }, onSuccess: () => { - if (student_status?.study_group) { + if (student_status?.study_group == "") { // Display separate toast if you stop studying while in a study group toast.show("You left study group \n" + student_status?.study_group, { type: "success", @@ -227,8 +224,8 @@ export default function Home() { duration: 2000, animationType: "slide-in", }); - navigation.navigate("Conversation"); } + queryClient.invalidateQueries({ queryKey: ["user_status"] }); // Delay refetching for study groups since backend still needs to delete groups without students after leaving a study group @@ -383,9 +380,9 @@ export default function Home() { (!StudentStatusQuery.isSuccess && studying && !StudentStatusListQuery.isSuccess && - !StudyGroupQuery.isSuccess && - !StudentStatusQuery.isSuccess) || - (!studying && + !StudyGroupQuery.isSuccess) || + (!StudentStatusQuery.isSuccess && + !studying && !StudentStatusListGlobalQuery.isSuccess && !StudyGroupGlobalQuery.isSuccess) ) { @@ -600,6 +597,7 @@ export default function Home() { study_group: studygroup.name, subject: studygroup.subject, }); + navigation.navigate("Conversation"); }} > @@ -1051,6 +1049,7 @@ export default function Home() { study_group: studygroup.name, subject: studygroup.subject, }); + navigation.navigate("Conversation"); setModalOpen(!modalOpen); }} > From 2603741aabf83baa1bbecac59747bc310504d670 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sat, 28 Oct 2023 00:22:17 +0800 Subject: [PATCH 36/43] Turn off debug flags and clear study group messages notification cache when switching study groups --- src/components/DrawerSettings/CustomDrawerContent.tsx | 2 +- src/routes/Home/Home.tsx | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/DrawerSettings/CustomDrawerContent.tsx b/src/components/DrawerSettings/CustomDrawerContent.tsx index 61ec820..578d429 100644 --- a/src/components/DrawerSettings/CustomDrawerContent.tsx +++ b/src/components/DrawerSettings/CustomDrawerContent.tsx @@ -27,7 +27,7 @@ import { useToast } from "react-native-toast-notifications"; import MessageIcon from "../../icons/MessageIcon/MessageIcon"; export default function CustomDrawerContent(props: {}) { - const debug = true; + const debug = false; const navigation = useNavigation(); const status = useSelector((state: RootState) => state.status); const dispatch = useDispatch(); diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index b7c6e12..3769c06 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -44,10 +44,11 @@ import Modal from "react-native-modal"; import DropdownIcon from "../../icons/CaretDownIcon/CaretDownIcon"; import CaretUpIcon from "../../icons/CaretUpIcon/CaretUpIcon"; import RefreshIcon from "../../icons/RefreshIcon/RefreshIcon"; +import AsyncStorage from "@react-native-async-storage/async-storage"; export default function Home() { // Switch this condition to see the main map when debugging - const map_distance_override = true; + const map_distance_override = false; const navigation = useNavigation(); const [location, setLocation] = useState(null); const [locationPermitted, setLocationPermitted] = useState(false); @@ -125,6 +126,9 @@ export default function Home() { } } + async function clear_messages_notification_cache() { + AsyncStorage.setItem("messages", ""); + } // Student Status const [studying, setStudying] = useState(false); const [subject, setSubject] = useState(""); @@ -163,7 +167,7 @@ export default function Home() { mutationFn: async (info: StudentStatusPatchType) => { const data = await PatchStudentStatus(info); if (data[0] != true) { - return Promise.reject(new Error()); + return Promise.reject(new Error(JSON.stringify(data[1]))); } return data; }, @@ -224,6 +228,7 @@ export default function Home() { duration: 2000, animationType: "slide-in", }); + clear_messages_notification_cache(); } queryClient.invalidateQueries({ queryKey: ["user_status"] }); @@ -932,6 +937,8 @@ export default function Home() { return ; } } else { + requestLocationPermission(); + requestLocation(); return ( <> From 7cd549cad7cbfeb18458cec445083e4cc57fe667 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Thu, 23 Nov 2023 23:27:38 +0800 Subject: [PATCH 37/43] Refetch user location when refreshing and added code snippet to stop user from studying if they stray too far from where they set their studying locatio. Also allow modal to be shown even when not currently studying --- src/routes/Home/Home.tsx | 132 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 125 insertions(+), 7 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 3769c06..aa29b01 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -48,7 +48,7 @@ import AsyncStorage from "@react-native-async-storage/async-storage"; export default function Home() { // Switch this condition to see the main map when debugging - const map_distance_override = false; + const map_distance_override = true; const navigation = useNavigation(); const [location, setLocation] = useState(null); const [locationPermitted, setLocationPermitted] = useState(false); @@ -117,7 +117,7 @@ export default function Home() { async function DistanceHandler(location: RawLocationType) { let dist = GetDistanceFromUSTP(location.coords); setDist(dist); - // Deactivate student status if too far away and still studying + // Deactivate student status if too far away from USTP and still studying if (dist >= 2 && !map_distance_override && studying && !stopping_toofar) { stop_studying.mutate({ active: false, @@ -152,6 +152,28 @@ export default function Home() { setSubject(data[1].subject); setStudying(data[1].active); setStudentStatus(data[1]); + // Deactivate student status if too far away from current location you are studying in + if(student_status && location){ + const dist = GetDistance( + student_status.location.latitude, + student_status.location.longitude, + location.coords.latitude, + location.coords.longitude + ); + console.log('Distance:',dist) + console.log(student_status.location.latitude, + student_status.location.longitude, + location.coords.latitude, + location.coords.longitude) + if (dist > 0.02 && studying && !stopping_toofar) { + console.log('Too far from current studying location') + stop_studying.mutate({ + active: false, + }); + setStopping(true); + } + } + }, onError: (error: Error) => { toast.show(String(error), { @@ -197,9 +219,7 @@ export default function Home() { }, 500); setStudyGroups([]); setStudying(false); - if (stopping_toofar) { setStopping(false); - } }, onError: (error: Error) => { toast.show(String(error), { @@ -893,6 +913,7 @@ export default function Home() { duration: 2000, animationType: "slide-in", }); + requestLocation() }} > @@ -908,7 +929,7 @@ export default function Home() { setModalOpen(true); }} > - {studying ? : <>} + {student_status?.active && !student_status?.study_group ? ( @@ -967,14 +988,16 @@ export default function Home() { > - + + + List View { setModalByGroup(!modalByGroup); }} + style={{alignSelf:'center'}} /> - List View @@ -1096,7 +1119,102 @@ export default function Home() { + + + setModalOpen(false)} + > + + + + List View + { + setModalByGroup(!modalByGroup); + }} + style={{alignSelf:'center'}} + /> + + + + {!modalByGroup ? ( + student_statuses_global.map( + (student_status: StudentStatusFilterType, index: number) => { + return ( + + + Student: {student_status.user} + + + {`Studying ${student_status.subject}`} + + + ); + } + ) + ) : ( + <> + )} + {modalByGroup ? ( + study_groups_global.map((studygroup: StudyGroupType, index: number) => { + return ( + + + Group Name: {studygroup.name} + + + {`Studying ${studygroup.subject}`} + + + Students Studying: {studygroup.students.length} + + + ); + }) + ) : ( + <> + )} + + + From c0a8a8efc8bd6a554253c98d0df7f8fd110dafea Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Thu, 23 Nov 2023 23:29:27 +0800 Subject: [PATCH 38/43] Always refresh location when pressing refresh button --- src/routes/Home/Home.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index aa29b01..21ee76a 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -85,15 +85,8 @@ export default function Home() { if (locationPermitted) { let newLocation = await Location.getCurrentPositionAsync(); if (newLocation) { - // Only update location state if user's location has changed - if ( - !location || - newLocation.coords.latitude !== location.coords.latitude || - newLocation.coords.longitude !== location.coords.longitude - ) { setLocation(newLocation); - await DistanceHandler(newLocation); - } + await DistanceHandler(newLocation); } } } From 51b7b24430ca4b4817b0ac1833051b477a681f8b Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 24 Nov 2023 00:22:14 +0800 Subject: [PATCH 39/43] Show landmarks if it exists in homepage and in conversation page --- src/components/Api/Api.tsx | 2 +- .../ConversationPage/ConversationPage.tsx | 10 +- src/routes/Home/Home.tsx | 113 +++++++++++------- 3 files changed, 81 insertions(+), 44 deletions(-) diff --git a/src/components/Api/Api.tsx b/src/components/Api/Api.tsx index f5dc3d2..e6111a9 100644 --- a/src/components/Api/Api.tsx +++ b/src/components/Api/Api.tsx @@ -22,7 +22,7 @@ if (__DEV__) { } // Switch this on if you wanna run production URLs while in development -let use_production = true; +let use_production = false; if (__DEV__ && use_production) { backendURL = "https://stude.keannu1.duckdns.org"; backendURLWebsocket = "ws://stude.keannu1.duckdns.org"; diff --git a/src/routes/ConversationPage/ConversationPage.tsx b/src/routes/ConversationPage/ConversationPage.tsx index 6bec280..94cae27 100644 --- a/src/routes/ConversationPage/ConversationPage.tsx +++ b/src/routes/ConversationPage/ConversationPage.tsx @@ -200,9 +200,17 @@ export default function ConversationPage() { > - {`Group: ${studygroup?.name ? studygroup.name : ""}`} + {`Group: ${studygroup?.name ? studygroup.name : "Loading..."}`} + {studygroup.landmark ? ( + + {studygroup.landmark} + + ) : ( + <> + )} + 0.02 && studying && !stopping_toofar) { - console.log('Too far from current studying location') + console.log("Too far from current studying location"); stop_studying.mutate({ active: false, }); setStopping(true); } } - }, onError: (error: Error) => { toast.show(String(error), { @@ -212,7 +213,7 @@ export default function Home() { }, 500); setStudyGroups([]); setStudying(false); - setStopping(false); + setStopping(false); }, onError: (error: Error) => { toast.show(String(error), { @@ -591,6 +592,13 @@ export default function Home() { Study Group: {studygroup.name} + {studygroup.landmark ? ( + + {studygroup.landmark} + + ) : ( + <> + )} {`Studying ${studygroup.subject}`} @@ -698,6 +706,13 @@ export default function Home() { Study Group: {studygroup.name} + {studygroup.landmark ? ( + + {studygroup.landmark} + + ) : ( + <> + )} {`Studying ${studygroup.subject}`} @@ -906,7 +921,7 @@ export default function Home() { duration: 2000, animationType: "slide-in", }); - requestLocation() + requestLocation(); }} > @@ -982,14 +997,13 @@ export default function Home() { - List View { setModalByGroup(!modalByGroup); }} - style={{alignSelf:'center'}} + style={{ alignSelf: "center" }} /> @@ -1048,6 +1062,13 @@ export default function Home() { Group Name: {studygroup.name} + {studygroup.landmark ? ( + + {studygroup.landmark} + + ) : ( + <> + )} {`Studying ${studygroup.subject}`} @@ -1130,14 +1151,13 @@ export default function Home() { - List View { setModalByGroup(!modalByGroup); }} - style={{alignSelf:'center'}} + style={{ alignSelf: "center" }} /> @@ -1174,34 +1194,43 @@ export default function Home() { <> )} {modalByGroup ? ( - study_groups_global.map((studygroup: StudyGroupType, index: number) => { - return ( - - - Group Name: {studygroup.name} - - - {`Studying ${studygroup.subject}`} - - - Students Studying: {studygroup.students.length} - - - ); - }) + study_groups_global.map( + (studygroup: StudyGroupType, index: number) => { + return ( + + + Group Name: {studygroup.name} + + {studygroup.landmark ? ( + + {studygroup.landmark} + + ) : ( + <> + )} + + {`Studying ${studygroup.subject}`} + + + Students Studying: {studygroup.students.length} + + + ); + } + ) ) : ( <> )} From d2aecbd89cb90dc9b6ca9592e72223c601faf61d Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 24 Nov 2023 00:26:02 +0800 Subject: [PATCH 40/43] Turn off debug flags --- src/components/Api/Api.tsx | 2 +- src/routes/Home/Home.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Api/Api.tsx b/src/components/Api/Api.tsx index e6111a9..f5dc3d2 100644 --- a/src/components/Api/Api.tsx +++ b/src/components/Api/Api.tsx @@ -22,7 +22,7 @@ if (__DEV__) { } // Switch this on if you wanna run production URLs while in development -let use_production = false; +let use_production = true; if (__DEV__ && use_production) { backendURL = "https://stude.keannu1.duckdns.org"; backendURLWebsocket = "ws://stude.keannu1.duckdns.org"; diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index e27fdbf..d854b88 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -48,7 +48,7 @@ import AsyncStorage from "@react-native-async-storage/async-storage"; export default function Home() { // Switch this condition to see the main map when debugging - const map_distance_override = true; + const map_distance_override = false; const navigation = useNavigation(); const [location, setLocation] = useState(null); const [locationPermitted, setLocationPermitted] = useState(false); From cbd82a05f9423944d243182e6fb68856c98c812d Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 24 Nov 2023 21:14:33 +0800 Subject: [PATCH 41/43] Added callout information for study groups when pressing on maps and improved responsiveness of the homepage map renderer --- src/routes/Home/Home.tsx | 178 ++++++++++++++++++++++++++++++++++----- 1 file changed, 159 insertions(+), 19 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index d854b88..efec988 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -6,10 +6,11 @@ import { ScrollView, Switch, ActivityIndicator, + TouchableHighlight, } from "react-native"; import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer"; import { useState, useEffect } from "react"; -import MapView, { Circle, Marker, UrlTile } from "react-native-maps"; +import MapView, { Callout, Circle, Marker, UrlTile } from "react-native-maps"; import * as Location from "expo-location"; import GetDistance from "../../components/GetDistance/GetDistance"; import Button from "../../components/Button/Button"; @@ -45,10 +46,11 @@ import DropdownIcon from "../../icons/CaretDownIcon/CaretDownIcon"; import CaretUpIcon from "../../icons/CaretUpIcon/CaretUpIcon"; import RefreshIcon from "../../icons/RefreshIcon/RefreshIcon"; import AsyncStorage from "@react-native-async-storage/async-storage"; +import AnimatedContainerNoScroll from "../../components/AnimatedContainer/AnimatedContainerNoScroll"; export default function Home() { // Switch this condition to see the main map when debugging - const map_distance_override = false; + const map_distance_override = true; const navigation = useNavigation(); const [location, setLocation] = useState(null); const [locationPermitted, setLocationPermitted] = useState(false); @@ -84,10 +86,10 @@ export default function Home() { async function requestLocation() { if (locationPermitted) { let newLocation = await Location.getCurrentPositionAsync(); - if (newLocation) { + setLocation(newLocation); await DistanceHandler(newLocation); - } + } } @@ -412,6 +414,19 @@ export default function Home() { Loading... ); + } else if ( + study_groups == undefined || + study_groups_global == undefined || + student_statuses == undefined|| + student_statuses_global == undefined + ) { + return ( + <> + + + Loading... + + ); } else if (dist && location) { if (dist <= 1 || map_distance_override) { return ( @@ -472,6 +487,7 @@ export default function Home() { zIndex={1000} onPress={() => { toast.hideAll(); + toast.show( + > + + + Student: {student_status.user} + + + {`Studying ${student_status.subject}`} + + + {`${Math.round( + GetDistance( + student_status.location.latitude, + student_status.location.longitude, + location.coords.latitude, + location.coords.longitude + ) * 1000 + )}m away`} + + + ); } ) @@ -581,6 +616,7 @@ export default function Home() { zIndex={1000} onPress={() => { toast.hideAll(); + toast.show( + > + + + Study Group: {studygroup.name} + + + Studying: {studygroup.subject} + + {studygroup.landmark ? ( + + {studygroup.landmark} + + ) : ( + <> + )} + + {`${studygroup.students.length} ${ + studygroup.students.length > 1 + ? "students" + : "student" + } studying`} + + + {`${Math.round( + studygroup.distance * 1000 + )}m away`} + + + + > + + + Study Group: {studygroup.name} + + + Studying: {studygroup.subject} + + {studygroup.landmark ? ( + + {studygroup.landmark} + + ) : ( + <> + )} + + {`${studygroup.students.length} ${ + studygroup.students.length > 1 + ? "students" + : "student" + } studying`} + + + {`${Math.round( + GetDistance( + studygroup.location.latitude, + studygroup.location.longitude, + location.coords.latitude, + location.coords.longitude + ) + )}m away`} + + + {`${Math.round(student_status.distance * 1000)}m away`} + {location && location.coords ? ( + + {`${Math.round( + GetDistance( + student_status.location.latitude, + student_status.location.longitude, + location.coords.latitude, + location.coords.longitude + ) + )}m away`} + + ) : ( + <> + )} ); } @@ -1063,12 +1174,12 @@ export default function Home() { Group Name: {studygroup.name} {studygroup.landmark ? ( - - {studygroup.landmark} - - ) : ( - <> - )} + + {studygroup.landmark} + + ) : ( + <> + )} {`Studying ${studygroup.subject}`} @@ -1186,6 +1297,20 @@ export default function Home() { {`Studying ${student_status.subject}`} + {location && location.coords ? ( + + {`${Math.round( + GetDistance( + student_status.location.latitude, + student_status.location.longitude, + location.coords.latitude, + location.coords.longitude + ) + )}m away`} + + ) : ( + <> + )} ); } @@ -1215,18 +1340,32 @@ export default function Home() { Group Name: {studygroup.name} {studygroup.landmark ? ( - - {studygroup.landmark} - - ) : ( - <> - )} + + {studygroup.landmark} + + ) : ( + <> + )} {`Studying ${studygroup.subject}`} Students Studying: {studygroup.students.length} + {location && location.coords ? ( + + {`${Math.round( + GetDistance( + studygroup.location.latitude, + studygroup.location.longitude, + location.coords.latitude, + location.coords.longitude + ) + )}m away`} + + ) : ( + <> + )} ); } @@ -1237,6 +1376,7 @@ export default function Home() { + From 05cee78d31ca07bf8dea431b78a7b9b333744621 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 24 Nov 2023 21:15:47 +0800 Subject: [PATCH 42/43] Format with Prettier and turn off debug flag --- src/routes/Home/Home.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index efec988..4197170 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -50,7 +50,7 @@ import AnimatedContainerNoScroll from "../../components/AnimatedContainer/Animat export default function Home() { // Switch this condition to see the main map when debugging - const map_distance_override = true; + const map_distance_override = false; const navigation = useNavigation(); const [location, setLocation] = useState(null); const [locationPermitted, setLocationPermitted] = useState(false); @@ -87,9 +87,8 @@ export default function Home() { if (locationPermitted) { let newLocation = await Location.getCurrentPositionAsync(); - setLocation(newLocation); - await DistanceHandler(newLocation); - + setLocation(newLocation); + await DistanceHandler(newLocation); } } @@ -417,7 +416,7 @@ export default function Home() { } else if ( study_groups == undefined || study_groups_global == undefined || - student_statuses == undefined|| + student_statuses == undefined || student_statuses_global == undefined ) { return ( From 0b3af716a5fecc97df1a63a1b4625567316f6a1f Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 10 Dec 2023 22:50:53 +0800 Subject: [PATCH 43/43] limit studying to within 250m of the center of ustp --- src/routes/Home/Home.tsx | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 4197170..ea7a5a1 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -93,8 +93,8 @@ export default function Home() { } useEffect(() => { - console.log("changed"); - console.log(locationPermitted); + // console.log("Location Update"); + // console.log(locationPermitted); requestLocation(); }, [locationPermitted]); @@ -112,7 +112,7 @@ export default function Home() { let dist = GetDistanceFromUSTP(location.coords); setDist(dist); // Deactivate student status if too far away from USTP and still studying - if (dist >= 2 && !map_distance_override && studying && !stopping_toofar) { + if (dist >= 1 && !map_distance_override && studying && !stopping_toofar) { stop_studying.mutate({ active: false, }); @@ -154,14 +154,7 @@ export default function Home() { location.coords.latitude, location.coords.longitude ); - console.log("Distance:", dist); - console.log( - student_status.location.latitude, - student_status.location.longitude, - location.coords.latitude, - location.coords.longitude - ); - if (dist > 0.02 && studying && !stopping_toofar) { + if (dist > 0.5 && studying && !stopping_toofar) { console.log("Too far from current studying location"); stop_studying.mutate({ active: false, @@ -427,7 +420,7 @@ export default function Home() { ); } else if (dist && location) { - if (dist <= 1 || map_distance_override) { + if (dist <= 0.25 || map_distance_override) { return ( <>