diff --git a/custom/basic-call/components/Prejoin/Intro.js b/custom/basic-call/components/Prejoin/Intro.js index 0f0eaf8..376ae74 100644 --- a/custom/basic-call/components/Prejoin/Intro.js +++ b/custom/basic-call/components/Prejoin/Intro.js @@ -35,44 +35,49 @@ export const Intro = ({ }, [room]); return ( - - {title} - - {error && ( - - Failed to obtain token

{error}

-
- )} - - setRoomName(e.target.value)} - required - /> - - {!forceFetchToken && ( - - setFetchToken(e.target.checked)} /> +
{ + e.preventDefault(); + onJoin(roomName, owner, fetchToken); + }}> + + {title} + + {error && ( + + Failed to obtain token

{error}

+
+ )} + + setRoomName(e.target.value)} + required + /> - )} - {fetchToken && !forceOwner && ( - - setOwner(e.target.checked)} /> - - )} -
- - - -
+ {!forceFetchToken && ( + + setFetchToken(e.target.checked)} /> + + )} + {fetchToken && !forceOwner && ( + + setOwner(e.target.checked)} /> + + )} + + + + + +
); }; diff --git a/custom/shared/components/HairCheck/HairCheck.js b/custom/shared/components/HairCheck/HairCheck.js index c57c960..1c0439b 100644 --- a/custom/shared/components/HairCheck/HairCheck.js +++ b/custom/shared/components/HairCheck/HairCheck.js @@ -30,7 +30,7 @@ import { useDeepCompareMemo } from 'use-deep-compare'; * - Set user name and join call / request access */ export const HairCheck = () => { - const { callObject, join } = useCallState(); + const { callObject } = useCallState(); const { localParticipant } = useParticipants(); const { deviceState, @@ -167,13 +167,13 @@ export const HairCheck = () => { /> ); - }, [userName, joinCall, joining, setUserName]); + }, [userName, joining, setUserName]); return ( <> @@ -222,7 +222,12 @@ export const HairCheck = () => { {tileMemo} -
{waiting ? showWaitingMessage : showUsernameInput}
+
{ + e.preventDefault(); + joinCall(userName); + }}> +
{waiting ? showWaitingMessage : showUsernameInput}
+