Index: my-react-app/src/App.js
===================================================================
--- my-react-app/src/App.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
+++ my-react-app/src/App.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
@@ -96,5 +96,5 @@
                 const option = currentTime.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false });
                 slots.push(option);
-                currentTime.setMinutes(currentTime.getMinutes() + 15); // Increment by 15 minutes
+                currentTime.setMinutes(currentTime.getMinutes() + 15);
             }
 
@@ -322,5 +322,5 @@
                             <div className="card-body">
                                 <div className="row">
-                                    {/* Narrow left column: info and actions */}
+
                                     <div className="col-md-4">
                                         <RestaurantInfo key={restaurant.id} restaurant={restaurant}/>
@@ -340,5 +340,5 @@
                                     </div>
 
-                                    {/* Wide right column: menu */}
+
                                     <div className="col-md-8">
                                         <ReadOnlyMenuList restaurantId={restaurant.restaurantId}/>
Index: my-react-app/src/components/ErrorPage.js
===================================================================
--- my-react-app/src/components/ErrorPage.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
+++ my-react-app/src/components/ErrorPage.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
@@ -1,3 +1,2 @@
-// ErrorPage.js
 import React from 'react';
 
@@ -7,5 +6,4 @@
             <h1>Oops! Something went wrong.</h1>
             <p>Please try again later or contact support.</p>
-            {/* Add any additional content or error-specific messages */}
         </div>
     );
Index: my-react-app/src/components/Layout.js
===================================================================
--- my-react-app/src/components/Layout.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
+++ my-react-app/src/components/Layout.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
@@ -1,3 +1,2 @@
-// Layout.js
 import React from 'react';
 import Header from './Header';
Index: my-react-app/src/components/ReadOnlyMenuList.js
===================================================================
--- my-react-app/src/components/ReadOnlyMenuList.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
+++ my-react-app/src/components/ReadOnlyMenuList.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
@@ -14,5 +14,5 @@
                 const response = await axios.get(`http://localhost:8081/api/restaurant-menu/${restaurantId}`);
                 setMenuItems(response.data);
-                setCurrentPage(1); // Reset to first page on restaurant change
+                setCurrentPage(1);
             } catch (err) {
                 console.error('Failed to fetch menu:', err);
Index: my-react-app/src/components/ReservationConfirmation.js
===================================================================
--- my-react-app/src/components/ReservationConfirmation.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
+++ my-react-app/src/components/ReservationConfirmation.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
@@ -27,5 +27,4 @@
                 const tableResponse = await axios.get(`http://localhost:8081/api/tables/${tableNumber}`);
                 setTable(tableResponse.data);
-                console.log(tableResponse.data)
                 const restaurantResponse = await axios.get(`http://localhost:8081/api/restaurants/${restaurantId}`);
                 setRestaurant(restaurantResponse.data);
@@ -65,5 +64,6 @@
                 preorderedItemName: item.itemName,
                 quantity: item.quantity,
-                price: item.price
+                price: item.price,
+                menuID: item.menuID
             }))
         };
@@ -76,5 +76,4 @@
                 }
             });
-            console.log('Reservation created successfully:', response.data);
             navigate("/reservations")
         } catch (error) {
@@ -112,5 +111,5 @@
             localStorage.removeItem('remainingTime');
             alert("Time has expired. Please try reserving again.");
-            navigate('/restaurants'); // Redirect or take necessary action
+            navigate('/restaurants');
         }
     }, [remainingTime, navigate]);
Index: my-react-app/src/components/ReservationEdit.js
===================================================================
--- my-react-app/src/components/ReservationEdit.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
+++ my-react-app/src/components/ReservationEdit.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
@@ -30,9 +30,10 @@
                 setIsLoading(true);
                 const response = await axios.get(`http://localhost:8081/api/reservations/${reservationId}`);
-                console.log(response)
                 setCheckInTime(response.data.reservationDateTime);
                 setFormData(response.data);
-                setRestaurant(response.data.restaurantName);
+
                 setRestaurantId(response.data.restaurantId);
+                const restaurantResponse = await axios.get(`http://localhost:8081/api/restaurants/${response.data.restaurantId}`);
+                setRestaurant(restaurantResponse.data);
 
                 setTableNumber(response.data.tableNumber);
@@ -45,5 +46,4 @@
             }
         };
-
         fetchReservation();
     }, [reservationId]);
@@ -64,42 +64,4 @@
         }
     }, [table]);
-
-    const generateTimeOptions = (operatingHours) => {
-        const now = new Date();
-        const selectedDateObj = new Date(selectedDate);
-
-        const { startTime, endTime } = parseOperatingHours(operatingHours, selectedDateObj);
-
-        const isToday = selectedDateObj.toDateString() === now.toDateString();
-
-        let currentTime;
-
-        if (isToday) {
-            const roundedNow = roundToNext15Minutes(now);
-
-            if (roundedNow < startTime) {
-                currentTime = startTime;
-            } else if (roundedNow > endTime) {
-                return [];
-            } else {
-                currentTime = roundedNow;
-            }
-        } else {
-            currentTime = startTime;
-        }
-
-        const options = [];
-        while (currentTime <= endTime) {
-            options.push(currentTime.toTimeString().slice(0, 5));
-            currentTime = new Date(currentTime.getTime() + 15 * 60 * 1000);
-        }
-
-        return options;
-    };
-
-    const roundToNext15Minutes = (date) => {
-        const ms = 1000 * 60 * 15;
-        return new Date(Math.ceil(date.getTime() / ms) * ms);
-    };
 
     useEffect(() => {
@@ -178,33 +140,55 @@
     const formattedDate = `${year}-${month}-${day}`;
 
-    const parseOperatingHours = (operatingHours, forDate) => {
-        const [start, end] = operatingHours.split('-');
-
-        const [startHour, startMinute] = start.split(':').map(Number);
-        const [endHour, endMinute] = end.split(':').map(Number);
-
-        const startTime = new Date(forDate);
-        startTime.setHours(startHour, startMinute, 0, 0);
-
-        const endTime = new Date(forDate);
-        endTime.setHours(endHour, endMinute, 0, 0);
-
-        return { startTime, endTime };
-    };
-
-    useEffect(() => {
-        if (formData?.restaurant?.operatingHours && selectedDate) {
-            const options = generateTimeOptions(formData.restaurant.operatingHours);
+    const generateTimeOptions = (operatingHours) => {
+        const now = new Date();
+        const selectedDateObj = new Date(selectedDate);
+        const isToday = selectedDateObj.toDateString() === now.toDateString();
+
+        let options = [];
+        for (const hours of operatingHours.split(',')) {
+            const [start, end] = hours.trim().split('-');
+            const startTime = new Date(selectedDateObj);
+            const endTime = new Date(selectedDateObj);
+            const [startHour, startMinute] = start.split(':').map(Number);
+            const [endHour, endMinute] = end.split(':').map(Number);
+            startTime.setHours(startHour, startMinute, 0);
+            endTime.setHours(endHour, endMinute, 0);
+
+            if (isToday && startTime < now) {
+                startTime.setTime(roundToNext15Minutes(now).getTime());
+            }
+
+            if (endTime <= now) {
+                setNoAvailableMessage('No available time due to closing.');
+                continue;
+            }
+
+            while (startTime <= endTime) {
+                options.push(startTime.toTimeString().slice(0, 5));
+                startTime.setMinutes(startTime.getMinutes() + 15);
+            }
+        }
+
+        return options.length ? options : ['No available time'];
+    };
+
+    const roundToNext15Minutes = (date) => {
+        const ms = 1000 * 60 * 15;
+        const roundedTime = new Date(Math.ceil(date.getTime() / ms) * ms);
+
+        if (roundedTime.getTime() === date.getTime()) {
+            roundedTime.setMinutes(roundedTime.getMinutes() + 15);
+        }
+
+        return roundedTime;
+    };
+
+    useEffect(() => {
+        if (restaurant?.operatingHours && selectedDate) {
+            const options = generateTimeOptions(restaurant.operatingHours);
             setTimeOptions(options);
         }
     }, [restaurant, selectedDate]);
 
-        // useEffect(() => {
-        //     if (checkInTime) {
-        //         const checkInDateObj = new Date(checkInTime);
-        //         setSelectedDate(checkInDateObj.toISOString().split("T")[0]);
-        //         setSelectedTime(checkInDateObj.toTimeString().slice(0, 5));
-        //     }
-        // }, [checkInTime]);
 
     return (
@@ -217,10 +201,10 @@
                     <div className="card-body">
                         <h2 className="card-title">
-                            {formData.restaurant.name} <StarRating key={formData.restaurant.id} rating={formData.restaurant.rating} />
+                            {restaurant?.name}
+                            <StarRating key={restaurant?.id} rating={restaurant?.rating || 0}/>
                         </h2>
-                        <p className="card-text">{formData.restaurant.name}</p>
-                        <p className="card-text">{formData.restaurant.operatingHours}</p>
-                        <p className="card-text">Ul. {formData.restaurant.address}</p>
-                        <br />
+                        <p className="card-text">Operating Hours: {restaurant?.operatingHours}</p>
+                        <p className="card-text">Address: Ul. {restaurant?.address}</p>
+                        <br/>
                     </div>
                     <form onSubmit={handleSubmit}>
Index: my-react-app/src/components/RestaurantDetails.js
===================================================================
--- my-react-app/src/components/RestaurantDetails.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
+++ my-react-app/src/components/RestaurantDetails.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
@@ -111,6 +111,4 @@
         });
     };
-
-    console.log(preOrderedItems)
 
     const roundToNext15Minutes = (date) => {
Index: my-react-app/src/components/StarRating.js
===================================================================
--- my-react-app/src/components/StarRating.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
+++ my-react-app/src/components/StarRating.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
@@ -2,9 +2,6 @@
 
 const StarRating = ({ rating }) => {
-    // Convert the rating to a number between 0 and 5
     const normalizedRating = Math.min(Math.max(0, rating), 5);
-    // Calculate the number of filled stars
     const filledStars = Math.floor(normalizedRating);
-    // Calculate the number of half stars
     const hasHalfStar = normalizedRating - filledStars >= 0.5;
 
@@ -12,9 +9,11 @@
         <div>
             {[...Array(filledStars)].map((_, index) => (
-                <span key={index} className="star">&#9733;</span>
+                <span key={`filled-${index}`} className="star">&#9733;</span>
             ))}
-            {hasHalfStar && <span className="star">&#9734;</span>}
+
+            {hasHalfStar && <span className="star half">&#9733;</span>}
+
             {[...Array(5 - filledStars - (hasHalfStar ? 1 : 0))].map((_, index) => (
-                <span key={filledStars + index + 1} className="star">&#9734;</span>
+                <span key={`empty-${index}`} className="star">&#9734;</span>
             ))}
         </div>
@@ -23,2 +22,3 @@
 
 export default StarRating;
+
Index: my-react-app/src/components/TimeSlotList.js
===================================================================
--- my-react-app/src/components/TimeSlotList.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
+++ 	(revision )
@@ -1,20 +1,0 @@
-import React from 'react';
-
-const TimeSlotList = ({ timeSlots }) => {
-    return (
-        <div>
-            <h3>Available Time Slots</h3>
-            {timeSlots.length > 0 ? (
-                <ul>
-                    {timeSlots.map((slot, index) => (
-                        <li key={index}>{slot}</li>
-                    ))}
-                </ul>
-            ) : (
-                <p>No available time slots.</p>
-            )}
-        </div>
-    );
-};
-
-export default TimeSlotList;
