From 446170fd0607b75e105cbf215e3bf8e76e56a26a Mon Sep 17 00:00:00 2001 From: Jagjot Singh Date: Mon, 18 Dec 2023 23:52:54 +0530 Subject: [PATCH] Initial Commit --- src/components/Main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Main.js b/src/components/Main.js index 7e3f8ff..56465e0 100644 --- a/src/components/Main.js +++ b/src/components/Main.js @@ -35,7 +35,7 @@ const Main = ({ state }) => { const roomCount = await contract.room(); const parsedRoomCount = roomCount.toNumber(); setRoomCount(parsedRoomCount); - + if (parsedRoomCount !== null) { setShowRoomCount(true); alert(`${parsedRoomCount} rooms available`); @@ -44,7 +44,7 @@ const Main = ({ state }) => { console.error("Error fetching room count:", error); } }; - + const checkBookedRoom = async () => { try {