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 React from "react";
|
||||||
import {
|
import {
|
||||||
BrowserRouter as Router,
|
HashRouter as Router,
|
||||||
Switch,
|
Switch,
|
||||||
Route,
|
Route,
|
||||||
Redirect,
|
Redirect,
|
||||||
|
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React, { useEffect, useMemo, useState } from "react";
|
import React, { useEffect, useMemo, useState } from "react";
|
||||||
import styles from "./Room.module.css";
|
import styles from "./Room.module.css";
|
||||||
import { useParams } from "react-router-dom";
|
import { useLocation, useParams } from "react-router-dom";
|
||||||
import {
|
import {
|
||||||
HangupButton,
|
HangupButton,
|
||||||
MicButton,
|
MicButton,
|
||||||
|
@ -53,7 +53,9 @@ function useLoadGroupCall(client, roomId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Room({ client }) {
|
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);
|
const { loading, error, groupCall } = useLoadGroupCall(client, roomId);
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue