Index: my-react-app/src/App.js
===================================================================
--- my-react-app/src/App.js	(revision 65b6638865a1485e9cc722615973d9fb675b9d84)
+++ my-react-app/src/App.js	(revision c63036ab16a14814936f12df8a962c114af9774b)
@@ -2,5 +2,5 @@
 import Customers from './components/Customers';
 import Layout from "./components/Layout";
-import React, {useEffect, useState} from 'react';
+import React, {useContext, useEffect, useState} from 'react';
 import CustomerFormContainer from "./components/CustomerFormContainer";
 import CustomerDetails from "./components/CustomerDetails";
@@ -12,4 +12,5 @@
 import ReservationEdit from "./components/ReservationEdit";
 import axios from "axios";
+import { CuisineContext } from './components/CuisineContext';
 
 const App = () => {
@@ -45,4 +46,6 @@
     const [timeSlots, setTimeSlots] = useState([]);
 
+    const cuisineTypes = useContext(CuisineContext);
+
     useEffect(() => {
         if (date) {
@@ -82,5 +85,4 @@
     }, [date]);
 
-
     const handleDateChange = (e) => {
         setDate(e.target.value);
@@ -102,22 +104,25 @@
         e.preventDefault();
         const [year, month, day] = date.split("-");
-
         let formattedDateTime;
-        const [selectedHours, selectedMinutes] = selectedTime.split(":");
-        // Check if selectedHours and selectedMinutes are valid numbers
-        if (!isNaN(selectedHours) && !isNaN(selectedMinutes)) {
-            const dateTime = new Date(Date.UTC(year, month - 1, day, selectedHours, selectedMinutes));
-            formattedDateTime = dateTime.toISOString().slice(0, 16).replace('T', ' ');
+
+        if (selectedTime) {
+            const [selectedHours, selectedMinutes] = selectedTime.split(":");
+            // Check if selectedHours and selectedMinutes are valid numbers
+            if (!isNaN(selectedHours) && !isNaN(selectedMinutes)) {
+                const dateTime = new Date(Date.UTC(year, month - 1, day, selectedHours, selectedMinutes));
+                formattedDateTime = dateTime.toISOString().slice(0, 16).replace('T', ' ');
+            }
         } else {
-            // Default values if selectedTime is not valid
+            // Find the first available time slot after the current time
             const now = new Date();
-            let defaultTime;
-            if (now.getHours() >= 9 && now.getHours() <= 23) {
-                defaultTime = now;
-            } else {
-                defaultTime = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 9, 0); // Set to 09:00 if current time is before 09:00
-            }
-            const dateTime = new Date(Date.UTC(year, month - 1, day, defaultTime.getHours(), defaultTime.getMinutes()));
-            formattedDateTime = dateTime.toISOString().slice(0, 16).replace('T', ' ');
+            const currentTime = now.getHours() * 60 + now.getMinutes(); // Current time in minutes
+            const nextSlot = timeSlots.find(slot => {
+                const [hours, minutes] = slot.split(":");
+                const slotTime = parseInt(hours) * 60 + parseInt(minutes); // Time of the slot in minutes
+                return slotTime > currentTime;
+            });
+
+            // If no slot is found after the current time, use the first slot of the day
+            formattedDateTime = nextSlot ? `${date} ${nextSlot}` : `${date} ${timeSlots[0]}`;
         }
 
@@ -128,6 +133,6 @@
         };
 
-        console.log("pecatam data pod mene")
-        console.log(data)
+        console.log("Data to be submitted:");
+        console.log(data);
 
         try {
@@ -141,4 +146,15 @@
     };
 
+    const handleSearchByCuisine = async (cuisine) => {
+        const cuisineName = cuisine.replace('Searching by cuisine: ', '');
+        try {
+            const response = await axios.post(`http://localhost:8080/api/search/shortcut/${cuisineName}`, cuisineName);
+            // Handle the response as needed
+            console.log(response.data); // Log the response data, for example
+        } catch (error) {
+            console.error('Error searching by cuisine:', error);
+            // Handle errors, such as displaying an error message to the user
+        }
+    };
 
 
@@ -154,6 +170,5 @@
     return (
         <div className="container">
-            <h2>Home</h2>
-            <p>Welcome to My Awesome App!</p>
+            <h2 className="display-1">Rezerviraj masa</h2>
             <form className="row g-2 align-items-center" onSubmit={handleSubmit}>
                 <div className="col-auto">
@@ -189,4 +204,21 @@
                     <button className="btn btn-outline-success" type="submit">Search</button>
                 </div>
+                <form>
+                    <div className="mb-3">
+                        <h2 className="display-2">Search by cuisine type</h2>
+                        <ul className="list-group">
+                            {cuisineTypes.map((cuisine, index) => (
+                                <li key={index} className="list-group-item">
+                                    <button type="button" className="btn btn-outline-primary"
+                                            onClick={() => handleSearchByCuisine(cuisine)}>
+                                        {cuisine}
+                                    </button>
+                                </li>
+                            ))}
+                        </ul>
+                    </div>
+                </form>
+
+
             </form>
         </div>
