diff --git a/src/App.jsx b/src/App.jsx index 28d842ba..d69637f2 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import { - BrowserRouter as Router, + HashRouter as Router, Switch, Route, Redirect, diff --git a/src/Room.jsx b/src/Room.jsx index fa5b0813..155d5072 100644 --- a/src/Room.jsx +++ b/src/Room.jsx @@ -16,7 +16,7 @@ limitations under the License. import React, { useEffect, useMemo, useState } from "react"; import styles from "./Room.module.css"; -import { useParams } from "react-router-dom"; +import { useLocation, useParams } from "react-router-dom"; import { HangupButton, MicButton, @@ -53,7 +53,9 @@ function useLoadGroupCall(client, roomId) { } export function Room({ client }) { - const { roomId } = useParams(); + const { roomId: maybeRoomId } = useParams(); + const { hash } = useLocation(); + const roomId = maybeRoomId || hash; const { loading, error, groupCall } = useLoadGroupCall(client, roomId); if (loading) {