diff --git a/apps/front/src/App.tsx b/apps/front/src/App.tsx index fe6ac28..2404d46 100644 --- a/apps/front/src/App.tsx +++ b/apps/front/src/App.tsx @@ -1,7 +1,7 @@ import { useEffect, useRef, useState } from "react"; import { makeStyles, Grid, useTheme } from "@material-ui/core"; -import { RoomContextProvider, useRoomContext } from "./context"; +import { RoomContextProvider } from "./context"; import { BuildingPlan } from "./components/BuildingPlan"; import { RoomList } from "./components/RoomList"; import { AppTheme } from "./theme"; @@ -11,6 +11,10 @@ const useStyles = makeStyles((theme) => ({ root: { padding: theme.spacing(10, 2, 2, 2), height: "100vh", + overflow: "hidden", + "& > div": { + height: "100%", + }, "& > div > *": { height: "100%", }, diff --git a/apps/front/src/components/BuildingPlan.tsx b/apps/front/src/components/BuildingPlan.tsx index 67b5417..0d9e275 100644 --- a/apps/front/src/components/BuildingPlan.tsx +++ b/apps/front/src/components/BuildingPlan.tsx @@ -58,7 +58,7 @@ export const BuildingPlan = ({ width, height }: BuildingPlanProps) => { const clickCb = (x: number, y: number) => { const index = getRoomByCoord(x, y, state.map); - if (index >= 0) toggleFree(index); + if (index >= 0) toggleFree(index + 1); }; return ( diff --git a/apps/front/src/components/RoomList.tsx b/apps/front/src/components/RoomList.tsx index 830a2bf..156803f 100644 --- a/apps/front/src/components/RoomList.tsx +++ b/apps/front/src/components/RoomList.tsx @@ -20,6 +20,12 @@ const useStyles = makeStyles((theme) => ({ width: "100%", height: `calc(100% - ${theme.spacing(1)}px)`, padding: theme.spacing(2), + overflow: "auto", + "-ms-overflow-style": "none", + scrollbarWidth: "none", + "&::-webkit-scrollbar": { + display: "none", + }, }, filterBox: { display: "flex", diff --git a/apps/front/src/context.tsx b/apps/front/src/context.tsx index a62c55c..a8c13f0 100644 --- a/apps/front/src/context.tsx +++ b/apps/front/src/context.tsx @@ -49,7 +49,11 @@ export const RoomContextProvider: FC = ({ children }) => { free, id, } of message.args) { - map.push({ coordinates: { x, y }, size: { w, h }, title: title }); + map.push({ + coordinates: { x, y }, + size: { w, h }, + title: title, + }); char.push({ free }); ids[id] = map.length - 1; }