Use hash based routing
This commit is contained in:
parent
0c475d7bac
commit
8f2082d092
2 changed files with 5 additions and 3 deletions
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
import React from "react";
|
||||
import {
|
||||
BrowserRouter as Router,
|
||||
HashRouter as Router,
|
||||
Switch,
|
||||
Route,
|
||||
Redirect,
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue