Re-use variable

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2023-08-08 14:08:37 +02:00
parent fd8f50957b
commit 89ae0e1e62
2 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ import { useLocation } from "react-router-dom";
import { Config } from "./config/Config";
const PASSWORD_STRING = "?password=";
export const PASSWORD_STRING = "?password=";
interface UrlParams {
roomAlias: string | null;

View File

@@ -39,7 +39,7 @@ import { Config } from "../config/Config";
import { MuteStates, useMuteStates } from "./MuteStates";
import { useMediaDevices, MediaDevices } from "../livekit/MediaDevicesContext";
import { useRoomSharedKey } from "../e2ee/sharedKeyManagement";
import { useUrlParams } from "../UrlParams";
import { PASSWORD_STRING, useUrlParams } from "../UrlParams";
declare global {
interface Window {
@@ -258,7 +258,7 @@ export function GroupCallView({
useEffect(() => {
const originalHash = location.hash;
const hash = originalHash === "" ? "#" : originalHash;
const [hashStart, password] = hash.split("?password=");
const [hashStart, password] = hash.split(PASSWORD_STRING);
if (password !== e2eeSharedKey) return;