Skip to content

Commit

Permalink
some more fixes in ui
Browse files Browse the repository at this point in the history
  • Loading branch information
curiousyuvi committed Mar 7, 2023
1 parent da1911d commit 9c96e13
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 328 deletions.
18 changes: 17 additions & 1 deletion client/pages/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default function CreateRoom() {
setRoomName(e.target.value);
};
const [validationIssue, setValidationIssue] = useState({ roomName: "" });
const [chatsHeight, setChatsHeight] = useState(0);

const { successToast } = useToast();

const createRoomMutation = useCreateRoom(() => {
Expand Down Expand Up @@ -70,11 +72,25 @@ export default function CreateRoom() {
}
};

useEffect(() => {
function handleResize() {
setChatsHeight(window.innerHeight - 120);
}

handleResize();
window.addEventListener("resize", handleResize);

return () => {
window.removeEventListener("resize", handleResize);
};
}, []);

return (
<div className="w-full h-full rounded-br-lg flex flex-col justify-start items-center gap-2 bg-blue-900/70">
<form
onSubmit={handleSubmit}
className="w-full h-[calc(100%] overflow-y-auto p-4 pb-12"
style={{ height: `${chatsHeight}px` }}
className="w-full overflow-y-auto p-4 pb-12"
>
<div className="w-full h-12 sm:h-24 flex justify-center items-center">
<h1 className="text-gray-200 text-2xl sm:text-4xl py-1">
Expand Down
327 changes: 0 additions & 327 deletions client/pages/room_test.tsx

This file was deleted.

0 comments on commit 9c96e13

Please sign in to comment.