refactor: router.replace to router.push and fix typos

This commit is contained in:
Sanidhya Kumar Verma
2024-09-04 10:19:02 +00:00
committed by GitHub
parent eb7e052d75
commit 19f0e71609
9 changed files with 97 additions and 18 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ const SignIn = () => {
if (signInAttempt.status === "complete") {
await setActive({ session: signInAttempt.createdSessionId });
router.replace("/");
router.push("/");
} else {
Alert.alert("Error", "Invalid email or password.");
setForm((prevForm) => ({
+1 -1
View File
@@ -235,7 +235,7 @@ const SignUp = () => {
<CustomButton
title="Browse Home"
onPress={() => router.replace("/(root)/(tabs)/home")}
onPress={() => router.push("/(root)/(tabs)/home")}
className="mt-5"
/>
</View>
+2 -2
View File
@@ -15,7 +15,7 @@ const Welcome = () => {
return (
<SafeAreaView className="flex h-full items-center justify-between bg-white">
<TouchableOpacity
onPress={() => router.replace("/(auth)/sign-up")}
onPress={() => router.push("/(auth)/sign-up")}
className="w-full flex justify-end items-end p-5"
>
<Text className="text-black text-base font-JakartaBold">Skip</Text>
@@ -54,7 +54,7 @@ const Welcome = () => {
<CustomButton
onPress={() =>
isLastSlide
? router.replace("/(auth)/sign-up")
? router.push("/(auth)/sign-up")
: swiperRef.current?.scrollBy(1)
}
title={isLastSlide ? "Get Started" : "Next"}
+1 -1
View File
@@ -24,7 +24,7 @@ const ConfirmRide = () => {
<View className="mx-5 mt-10">
<CustomButton
title="Select Ride"
onPress={() => router.replace("/(root)/book-ride")}
onPress={() => router.push("/(root)/book-ride")}
/>
</View>
)}
+1 -1
View File
@@ -42,7 +42,7 @@ const FindRide = () => {
<CustomButton
title="Find now"
onPress={() => router.replace("/(root)/confirm-ride")}
onPress={() => router.push("/(root)/confirm-ride")}
className="mt-5"
/>
</RideLayout>