Skip to content

Commit

Permalink
confirm ride
Browse files Browse the repository at this point in the history
  • Loading branch information
Satora1 committed Oct 22, 2024
1 parent eb736cf commit c24c50b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
12 changes: 12 additions & 0 deletions app/(root)/confirm-ride.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Text, View } from "react-native"

const ConfirmRide=()=>{
return(
<View>
<Text>
Confirm ride
</Text>
</View>
)
}
export default ConfirmRide
25 changes: 22 additions & 3 deletions app/(root)/find-ride.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
import CustomButton from "@/components/CustomButton"
import GoogleTextInput from "@/components/GoogleTextInput"
import RideLayout from "@/components/RideLayout"
import { icons } from "@/constants"
import { useLocationStore } from "@/store"
import { router } from "expo-router"
import { Text, View } from "react-native"

const FindRide = () => {
const { userAddress, destinationAddress, setDestinationLocation, setUserLocation } = useLocationStore()
return (
< RideLayout >
<Text className="text-2xl">Find Ride</Text>

< RideLayout title="Ride" >
<View className="my-3">
<Text className="text-lg font-JakartaSemiBold mb-3">From</Text>
<GoogleTextInput icon={icons.target} initialLocation={userAddress!}
containerStyle="bg-neutral-100"
textInputBackgroundColor="#f5f5f5"
handlePress={(location) => { setUserLocation(location) }}
/>
</View>
<View className="my-3">
<Text className="text-lg font-JakartaSemiBold mb-3">To</Text>
<GoogleTextInput icon={icons.map} initialLocation={destinationAddress!}
containerStyle="bg-neutral-100"
textInputBackgroundColor="transparent"
handlePress={(location) => { setDestinationLocation(location) }}
/>
</View>
<CustomButton title="Find now" onPress={()=>router.push("/(root)/confirm-ride")} className="mt-5"/>
</RideLayout >
)

Expand Down

0 comments on commit c24c50b

Please sign in to comment.