refactor: update URL construction in handlePreJoinSubmit function (#316)

This commit is contained in:
Jonas Schell 2024-09-09 18:21:56 +02:00 committed by GitHub
parent d09ef1f163
commit c35dea2f97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,8 +50,7 @@ export function PageClientImpl(props: {
const handlePreJoinSubmit = React.useCallback(async (values: LocalUserChoices) => {
setPreJoinChoices(values);
const url = new URL('/', window.location.origin);
url.pathname = CONN_DETAILS_ENDPOINT;
const url = new URL(CONN_DETAILS_ENDPOINT, window.location.origin);
url.searchParams.append('roomName', props.roomName);
url.searchParams.append('participantName', values.username);
if (props.region) {