Skip to content

Commit

Permalink
Fix dark mode issue on all-rooms-page
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Tran committed Nov 14, 2024
1 parent 9dee7d1 commit 1a927c0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
18 changes: 9 additions & 9 deletions frontend/components/AllRoomsRoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Stack,
Typography,
} from "@mui/material";
import { styled } from "@mui/system";
import { RoomAvailabilityBoxProps } from "views/RoomAvailabilityBox";

import RoomAvailability from "./RoomAvailability";
Expand All @@ -19,14 +20,7 @@ const Room: React.FC<AllRoomsRoomProps> = ({
...roomStatus
}) => {
return (
<Card
variant="outlined"
sx={{
backgroundColor: "#ffffff",
marginTop: 1,
overflow: "visible",
}}
>
<StyledRoomCard variant="outlined">
<CardActionArea href={`/room/${roomNumber}`} target="_blank">
<CardContent>
<Stack
Expand All @@ -50,8 +44,14 @@ const Room: React.FC<AllRoomsRoomProps> = ({
</Stack>
</CardContent>
</CardActionArea>
</Card>
</StyledRoomCard>
);
};

const StyledRoomCard = styled(Card)(({ theme }) => ({
backgroundColor: theme.palette.background.default,
marginTop: 1,
overflow: "visible",
}));

export default Room;
10 changes: 7 additions & 3 deletions frontend/components/AllRoomsSearchBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Stack from "@mui/material/Stack";
import { styled } from "@mui/system";
import {
DatePicker,
LocalizationProvider,
Expand All @@ -16,7 +17,7 @@ export default function AllRoomsSearchBar() {
const datetime = useSelector(selectDatetime);

return (
<Stack
<StyledStack
direction="row"
gap={2}
justifyContent="space-between"
Expand All @@ -25,7 +26,6 @@ export default function AllRoomsSearchBar() {
position="sticky"
top="0px"
zIndex={1}
sx={{ backgroundColor: "#fff" }}
>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DatePicker
Expand All @@ -45,6 +45,10 @@ export default function AllRoomsSearchBar() {
}
/>
</LocalizationProvider>
</Stack>
</StyledStack>
);
}

const StyledStack = styled(Stack)(({ theme }) => ({
backgroundColor: theme.palette.background.default,
}));

0 comments on commit 1a927c0

Please sign in to comment.