one error solve
parent
3565652962
commit
efcd5b54ed
19
app.json
19
app.json
|
@ -7,10 +7,10 @@
|
|||
"icon": "./assets/images/icon.png",
|
||||
"scheme": "myapp",
|
||||
"userInterfaceStyle": "automatic",
|
||||
"splash":{
|
||||
"image":"./assets/images/splash.png",
|
||||
"resizeMode":"cover",
|
||||
"backgroundColor":"#2f80ed"
|
||||
"splash": {
|
||||
"image": "./assets/images/splash.png",
|
||||
"resizeMode": "cover",
|
||||
"backgroundColor": "#2f80ed"
|
||||
},
|
||||
"newArchEnabled": true,
|
||||
"ios": {
|
||||
|
@ -20,7 +20,8 @@
|
|||
"adaptiveIcon": {
|
||||
"foregroundImage": "./assets/images/adaptive-icon.png",
|
||||
"backgroundColor": "#ffffff"
|
||||
}
|
||||
},
|
||||
"package": "com.uberclone.riderapp"
|
||||
},
|
||||
"web": {
|
||||
"bundler": "metro",
|
||||
|
@ -32,6 +33,14 @@
|
|||
],
|
||||
"experiments": {
|
||||
"typedRoutes": true
|
||||
},
|
||||
"extra": {
|
||||
"router": {
|
||||
"origin": false
|
||||
},
|
||||
"eas": {
|
||||
"projectId": "c04e1792-9af9-4353-be36-181c9fe79708"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ const SignUp = () => {
|
|||
})
|
||||
if (CompleteSignUp.status === "complete") {
|
||||
const clerkId=signUp.createdUserId;
|
||||
const response= await fetchAPI("http://192.168.29.1:3000/api/users",{
|
||||
const response= await fetchAPI("http://192.168.29.174:3000/api/users",{
|
||||
method:"POST",
|
||||
headers:{"Content-Type":"application/json"},
|
||||
body:JSON.stringify({
|
||||
|
|
|
@ -64,7 +64,7 @@ const BookRide = () => {
|
|||
<View style={tw`flex flex-row items-center justify-between w-full border-b border-white py-3`}>
|
||||
<Text style={tw`text-lg font-JakartaRegular`}>Pickup Time</Text>
|
||||
<Text style={tw`text-lg font-JakartaRegular`}>
|
||||
{formatTime(driverDetails?.time || 5 ! )}
|
||||
{formatTime(parseInt(`${driverDetails.time!}`) )}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ export async function POST(request: Request) {
|
|||
const sql = neon(process.env.DATABASE_URL as string);
|
||||
const { name, email, clerkId } = await request.json()
|
||||
if (!name || !email || !clerkId) {
|
||||
// return Response.json({ error: "Miss required fields" }, { status: 400 })
|
||||
return new Response(JSON.stringify({ error: "Missing required fields" }), { status: 400 });
|
||||
return Response.json({ error: "Miss required fields" }, { status: 400 });
|
||||
// return new Response(JSON.stringify({ error: "Missing required fields" }), { status: 400 });
|
||||
|
||||
}
|
||||
const response = await sql`
|
||||
|
|
|
@ -2,10 +2,11 @@ import { icons } from "@/constants";
|
|||
import { Image, Text, View } from "react-native";
|
||||
import tw from "twrnc";
|
||||
import { formatDate, formatTime } from "@/lib/utils";
|
||||
import { Ride } from "@/types/type";
|
||||
const RideCard = ({ ride: { destination_longitude, destination_latitude, origin_address, destination_address, created_at, ride_time, driver,payment_status }, }: { ride: Ride }) => (
|
||||
<View style={tw`flex flex-row items-center justify-center bg-white rounded-lg shadow-sm shadow-neutral-300 mb-3`}>
|
||||
<View style={tw`flex flex-col items-center justify-center p-3`}>
|
||||
<View style={tw`flex flex-row items-center justify-between`}>
|
||||
<View style={tw`flex flex-row items-center justify-center bg-white rounded-lg shadow-sm shadow-neutral-300 mb-3`} >
|
||||
<View style={tw`flex flex-col items-center justify-center p-3`} >
|
||||
<View style={tw`flex flex-row items-center justify-between`} >
|
||||
<Image
|
||||
source={{ uri: `https://maps.geoapify.com/v1/staticmap?style=osm-bright&width=600&height=400¢er=lonlat:${destination_longitude},${destination_latitude}&zoom=14&apiKey=${process.env.EXPO_PUBLIC_GEOAPIFY_API_KEY}`, }}
|
||||
style={tw`w-[80px] h-[90px] rounded-lg`} />
|
||||
|
@ -35,7 +36,7 @@ const RideCard = ({ ride: { destination_longitude, destination_latitude, origin_
|
|||
</View>
|
||||
<View style={tw`flex flex-row items-center w-full justify-between mb-5`} >
|
||||
<Text style={tw`text-md font-JakartaMedium text-gray-500 `}>payment Status</Text>
|
||||
<Text style={tw`text-md font-JakartaMedium text-gray-500 ${payment_status === 'paid' ? "text-green-500" : "text-red-500"}`}>{payment_status.charAt(0).toUpperCase() + payment_status.slice(1)}</Text>
|
||||
<Text style={tw`text-md font-JakartaMedium text-gray-500 ${payment_status === 'paid' ? "text-green-500" : "text-red-500"}`}> {payment_status.charAt(0).toUpperCase() + payment_status.slice(1)}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"cli": {
|
||||
"version": ">= 16.2.2",
|
||||
"appVersionSource": "remote"
|
||||
},
|
||||
"build": {
|
||||
"development": {
|
||||
"developmentClient": true,
|
||||
"distribution": "internal"
|
||||
},
|
||||
"preview": {
|
||||
"distribution": "internal"
|
||||
},
|
||||
"production": {
|
||||
"autoIncrement": true
|
||||
}
|
||||
},
|
||||
"submit": {
|
||||
"production": {}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue