one error solve

master
neel 2025-04-10 09:40:53 +05:30
parent 3565652962
commit efcd5b54ed
6 changed files with 44 additions and 13 deletions

View File

@ -20,7 +20,8 @@
"adaptiveIcon": { "adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png", "foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff" "backgroundColor": "#ffffff"
} },
"package": "com.uberclone.riderapp"
}, },
"web": { "web": {
"bundler": "metro", "bundler": "metro",
@ -32,6 +33,14 @@
], ],
"experiments": { "experiments": {
"typedRoutes": true "typedRoutes": true
},
"extra": {
"router": {
"origin": false
},
"eas": {
"projectId": "c04e1792-9af9-4353-be36-181c9fe79708"
}
} }
} }
} }

View File

@ -49,7 +49,7 @@ const SignUp = () => {
}) })
if (CompleteSignUp.status === "complete") { if (CompleteSignUp.status === "complete") {
const clerkId=signUp.createdUserId; 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", method:"POST",
headers:{"Content-Type":"application/json"}, headers:{"Content-Type":"application/json"},
body:JSON.stringify({ body:JSON.stringify({

View File

@ -64,7 +64,7 @@ const BookRide = () => {
<View style={tw`flex flex-row items-center justify-between w-full border-b border-white py-3`}> <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`}>Pickup Time</Text>
<Text style={tw`text-lg font-JakartaRegular`}> <Text style={tw`text-lg font-JakartaRegular`}>
{formatTime(driverDetails?.time || 5 ! )} {formatTime(parseInt(`${driverDetails.time!}`) )}
</Text> </Text>
</View> </View>

View File

@ -4,8 +4,8 @@ export async function POST(request: Request) {
const sql = neon(process.env.DATABASE_URL as string); const sql = neon(process.env.DATABASE_URL as string);
const { name, email, clerkId } = await request.json() const { name, email, clerkId } = await request.json()
if (!name || !email || !clerkId) { if (!name || !email || !clerkId) {
// return Response.json({ error: "Miss required fields" }, { status: 400 }) return Response.json({ error: "Miss required fields" }, { status: 400 });
return new Response(JSON.stringify({ error: "Missing required fields" }), { status: 400 }); // return new Response(JSON.stringify({ error: "Missing required fields" }), { status: 400 });
} }
const response = await sql` const response = await sql`

View File

@ -2,6 +2,7 @@ import { icons } from "@/constants";
import { Image, Text, View } from "react-native"; import { Image, Text, View } from "react-native";
import tw from "twrnc"; import tw from "twrnc";
import { formatDate, formatTime } from "@/lib/utils"; 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 }) => ( 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-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-col items-center justify-center p-3`} >

21
eas.json Normal file
View File

@ -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": {}
}
}