Skip to content

Commit

Permalink
fix: add null validation on username
Browse files Browse the repository at this point in the history
  • Loading branch information
George-Spanos committed Jun 4, 2024
1 parent 1687be5 commit d838415
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/src/pages/prejoin/prejoinForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ const PrejoinForm: Component = () => {
}
async function handleSubmit(e: Event) {
e.preventDefault();
if (!username()) {
setUsernameError('Please add a username');
return;
}
isCreatingRoom ? createRoomQuery.refetch() : navigate(`/room/${roomId()}`);
}
return (
Expand Down

0 comments on commit d838415

Please sign in to comment.