From 3891f12f5d6fde16d4df7adc6a2b186bbd6592e0 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 27 Oct 2023 20:52:49 +0800 Subject: [PATCH] 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"] });