25 lines
1.4 KiB
TypeScript
25 lines
1.4 KiB
TypeScript
import Ridelayout from "@/components/RideLayout";
|
|
import { icons } from "@/constants";
|
|
import { useLocationStore } from "@/store";
|
|
import { Text, View } from "react-native";
|
|
import tw from "twrnc";
|
|
import GoogleTextInput from "@/components/GoogleTextInput";
|
|
import CustomButton from "@/components/CustomButton";
|
|
import { router } from "expo-router";
|
|
const FindRide=() => {
|
|
const {userAddress,destinationAddress,setDestinationLocation,setUserLocation,} = useLocationStore();
|
|
return(
|
|
<Ridelayout title="Ride" snapPoints={["85%"]} >
|
|
<View style={tw`my-3`} >
|
|
<Text style={tw`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 style={tw`my-3`} >
|
|
<Text style={tw`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")} style={tw`mt-5`} />
|
|
</Ridelayout>
|
|
)
|
|
}
|
|
export default FindRide; |