Redirect to conversations page instead of homepage when joining or creating a study group

This commit is contained in:
Keannu Bernasol 2023-10-27 20:52:49 +08:00
parent 6564b52dc0
commit 3891f12f5d
2 changed files with 4 additions and 3 deletions

View file

@ -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) => {

View file

@ -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<RootDrawerParamList>();
const [location, setLocation] = useState<RawLocationType | null>(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"] });