Update the URL the lobby view when the password changes
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -79,6 +79,17 @@ export const LobbyView: FC<Props> = ({
|
|||||||
[setE2EESharedKey]
|
[setE2EESharedKey]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const originalHash = location.hash;
|
||||||
|
let hash = originalHash === "" ? "#" : originalHash;
|
||||||
|
hash = hash.split("?password=")[0];
|
||||||
|
hash += `?password=${e2eeSharedKey ?? ""}`;
|
||||||
|
|
||||||
|
if (originalHash !== hash) {
|
||||||
|
location.replace(hash);
|
||||||
|
}
|
||||||
|
}, [e2eeSharedKey]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.room}>
|
<div className={styles.room}>
|
||||||
{!hideHeader && (
|
{!hideHeader && (
|
||||||
|
|||||||
Reference in New Issue
Block a user