diff --git a/frontend/src/components/App.tsx b/frontend/src/components/App.tsx index 55d33600..e6ea484e 100644 --- a/frontend/src/components/App.tsx +++ b/frontend/src/components/App.tsx @@ -5,24 +5,11 @@ import { SnackbarProvider } from 'notistack'; import MainView from './MainView/MainView'; import LoginView from './login/LoginView'; import { CssBaseline, Divider, styled, ThemeProvider } from '@mui/material'; -import { renderToStaticMarkup } from 'react-dom/server'; -import { DesktopBackground, MobileBackground } from './images/svgImages'; import { theme_2024 } from '../theme_2024'; export const GarApp = styled(Divider)(() => ({})); const App = () => { - // Basic solution for differentiating between desktop and mobile. Switch from desktop to mobile resolution requires a page refresh - // to show background correctly. - let svgString = encodeURIComponent( - renderToStaticMarkup() - ); - if (window.innerWidth > 600) { - svgString = encodeURIComponent( - renderToStaticMarkup() - ); - } - return ( diff --git a/frontend/src/components/AvailableRoomList/AvailableRoomList.tsx b/frontend/src/components/AvailableRoomList/AvailableRoomList.tsx index 9bee7e95..1ed3ff90 100644 --- a/frontend/src/components/AvailableRoomList/AvailableRoomList.tsx +++ b/frontend/src/components/AvailableRoomList/AvailableRoomList.tsx @@ -1,15 +1,16 @@ import { useState } from 'react'; -import { List, Typography, Box, ToggleButton } from '@mui/material'; +import { Box, List, ToggleButton, Typography } from '@mui/material'; import { styled } from '@mui/material/styles'; import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; import { makeBooking } from '../../services/bookingService'; -import { Booking, BookingDetails, Room, Preferences } from '../../types'; +import { Booking, BookingDetails, Preferences, Room } from '../../types'; import { DateTime, Duration } from 'luxon'; import useCreateNotification from '../../hooks/useCreateNotification'; import RoomCard from '../RoomCard/RoomCard'; import NoRoomsCard from '../RoomCard/NoRoomsCard'; import BookingDrawer from '../BookingDrawer/BookingDrawer'; import TimePickerDrawer from '../TimePickerDrawer/TimePickerDrawer'; + const SKIP_CONFIRMATION = true; const TimePickerButton = styled(ToggleButton)(() => ({ @@ -277,15 +278,17 @@ const AvailableRoomList = (props: BookingListProps) => { onAddTimeUntilNext={handleUntilNextDurationChange} startingTime={startingTime} /> - - setExpandTimePickerDrawer(newOpen) - } - startingTime={startingTime} - setStartingTime={setStartingTime} - setExpandTimePickerDrawer={setExpandTimePickerDrawer} - /> + { + + setExpandTimePickerDrawer(newOpen) + } + startingTime={startingTime} + setStartingTime={setStartingTime} + setExpandTimePickerDrawer={setExpandTimePickerDrawer} + /> + }
({ : theme.palette.background.default })); -const Puller = styled(Box)(({ theme }) => ({ - width: '30%', - height: 4, - backgroundColor: theme.palette.mode === 'light' ? '#F6F5F5' : grey[900], - borderRadius: 3 -})); - const DrawerHeader = styled(Box)(({ theme }) => ({ padding: '24px', display: 'flex', @@ -59,8 +53,8 @@ const FilterCounter = styled(Box)(({ theme }) => ({ alignItems: 'center', justifyContent: 'center', margin: '0 4px', - color: '#F6F5F5', - backgroundColor: '#CE3B20' + color: COLORS.TEXT_PRIMARY, + backgroundColor: COLORS.ACCENT_BLUE })); const DrawerTitle = styled(Typography)(({ theme }) => ({ @@ -183,29 +177,31 @@ const SwipeableEdgeDrawer = (props: Props) => { maxWidth: '1000px' }} > - - - {left} - - {title} - {filters} - - + - {right} - - - + {left} + {title} + {filters} + + {right} + + + + ) : ( + '' + )} {children}