Fix the call type selector

This commit is contained in:
Robin Townsend
2022-08-18 18:30:51 -04:00
parent fc0a3f38ac
commit ba4258aa89
3 changed files with 43 additions and 6 deletions

View File

@@ -56,13 +56,13 @@ export function RegisteredView({ client, isPasswordlessUser }: Props) {
const data = new FormData(e.target as HTMLFormElement);
const roomNameData = data.get("callName");
const roomName = typeof roomNameData === "string" ? roomNameData : "";
// const ptt = callType === CallType.Radio;
const ptt = callType === CallType.Radio;
async function submit() {
setError(undefined);
setLoading(true);
const [roomIdOrAlias] = await createRoom(client, roomName);
const [roomIdOrAlias] = await createRoom(client, roomName, ptt);
if (roomIdOrAlias) {
history.push(`/room/${roomIdOrAlias}`);
@@ -82,7 +82,7 @@ export function RegisteredView({ client, isPasswordlessUser }: Props) {
}
});
},
[client, history, modalState]
[client, history, modalState, callType]
);
const recentRooms = useGroupCallRooms(client);