From 776f680ca58d066e24284b009eb9a28ced03a6ea Mon Sep 17 00:00:00 2001
From: omagdy7 <omar.professional8777@gmail.com>
Date: Fri, 22 Dec 2023 23:10:26 +0200
Subject: Made the Driver dashboard respond to requests at realtime

---
 driver/src/components/RideDialog.tsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'driver/src/components/RideDialog.tsx')

diff --git a/driver/src/components/RideDialog.tsx b/driver/src/components/RideDialog.tsx
index e57fc89..f543412 100644
--- a/driver/src/components/RideDialog.tsx
+++ b/driver/src/components/RideDialog.tsx
@@ -23,7 +23,7 @@ function RideDialog({ name, brand, model, color, plateNumber, phoneNumber }: any
   const [orderTime, _setOrderTime] = useState<Date>(new Date())
   const [pickUpLocation, setPickUpLocation] = useState<string>()
   const [dropOffLocation, setDropOffLocation] = useState<string>()
-  const [isRideAdded, setIsRideAdded] = useState(true)
+  const [isRideAdded, setIsRideAdded] = useState(false)
   const [cost, setCost] = useState('')
 
 
@@ -113,13 +113,12 @@ function RideDialog({ name, brand, model, color, plateNumber, phoneNumber }: any
           <DialogFooter>
             <Button className="bg-green-500 text-black" type="submit" onClick={() => {
               if (isRideAdded) {
-                console.log("Hello")
                 toast({
                   title: "Cannot add another ride",
                   description: "You already have a ride in place",
                 })
               } else {
-                addRideOrderToFirestore
+                addRideOrderToFirestore()
                 toast({
                   description: "Ride was added successfully",
                 })
-- 
cgit v1.2.3

