Changeset c44c5ed for my-react-app/src/App.js
- Timestamp:
- 05/02/25 15:06:42 (2 weeks ago)
- Branches:
- main
- Children:
- 142c0f8
- Parents:
- 2518b3a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
my-react-app/src/App.js
r2518b3a rc44c5ed 19 19 import ReservationHistory from "./components/ReservationHistory"; 20 20 import AuthContent from "./components/AuthContent"; 21 import MenuList from "./components/MenuList"; 22 import ReadOnlyMenuList from "./components/ReadOnlyMenuList"; 21 23 22 24 const ProtectedRoute = ({ element, isAuthenticated }) => { … … 326 328 <div key={restaurant.id} className="card mb-3"> 327 329 <div className="card-body"> 328 < RestaurantInfo key={restaurant.id} restaurant={restaurant}/>329 {/*<p>Available time slots</p>*/}330 <div className="d-flex flex-wrap">331 {restaurant.tablesList && restaurant.tablesList.length > 0 ? (330 <div className="row"> 331 {/* Narrow left column: info and actions */} 332 <div className="col-md-4"> 333 <RestaurantInfo key={restaurant.id} restaurant={restaurant}/> 332 334 <div className="d-flex flex-wrap"> 333 {renderTimeSlots(restaurant.tablesList, restaurant)} 335 {restaurant.tablesList && restaurant.tablesList.length > 0 ? ( 336 renderTimeSlots(restaurant.tablesList, restaurant) 337 ) : ( 338 <p>No tables available for reservations at this restaurant</p> 339 )} 334 340 </div> 335 ) : ( 336 <p>No tables available for reservations at this restaurant</p> 337 )} 341 <button 342 className="btn btn-secondary mt-3" 343 onClick={() => handleGoToRestaurant(restaurant.restaurantId)} 344 > 345 Go to Restaurant 346 </button> 347 </div> 348 349 {/* Wide right column: menu */} 350 <div className="col-md-8"> 351 <ReadOnlyMenuList restaurantId={restaurant.restaurantId}/> 352 </div> 338 353 </div> 339 <button340 className="btn btn-secondary"341 onClick={() => handleGoToRestaurant(restaurant.restaurantId)}342 >343 Go to Restaurant344 </button>345 354 </div> 346 355 </div> 347 356 ))} 348 357 </div> 358 349 359 350 360 {showCuisineSearch && (
Note:
See TracChangeset
for help on using the changeset viewer.