some css fix and websocket fix for item update

This commit is contained in:
2026-02-20 01:38:37 +01:00
parent e7a283b39e
commit aecad87a9a
19 changed files with 997 additions and 633 deletions

View File

@@ -1,12 +1,17 @@
import "./RoomWidget.css";
import { useHotel } from "../HotelContext";
import { useHotel } from "../context/HotelContext";
import { useState } from "react";
export default function RoomWidget({ roomlist }) {
export default function RoomWidget({}) {
const { rooms } = useHotel();
return (
<div className="grid">
{roomlist.map(room => (
<div className="roomGrid">
{rooms.map(room => (
<RoomCard
key={room.id}
id = {room.id}
@@ -19,8 +24,6 @@ export default function RoomWidget({ roomlist }) {
}
function RoomCard({ number, status ,id}) {
//FIXME: this shouldn't use hotel context, instead : set the state once on load
const { updateRoomStatus } = useHotel();
const [editing, setEdtiting] = useState(false);