Add room not found view

This commit is contained in:
Robert Long
2022-02-14 13:53:19 -08:00
parent 3ed35f9477
commit 47357b3fc6
5 changed files with 119 additions and 1 deletions

View File

@@ -2,6 +2,8 @@ import React from "react";
import { useLoadGroupCall } from "./useLoadGroupCall";
import { ErrorView, FullScreenView } from "../FullScreenView";
import { usePageTitle } from "../usePageTitle";
import { isLocalRoomId } from "../matrix-utils";
import { RoomNotFoundView } from "./RoomNotFoundView";
export function GroupCallLoader({ client, roomId, viaServers, children }) {
const { loading, error, groupCall } = useLoadGroupCall(
@@ -20,6 +22,10 @@ export function GroupCallLoader({ client, roomId, viaServers, children }) {
);
}
if (error && error.errcode === "M_UNKNOWN" && isLocalRoomId(roomId)) {
return <RoomNotFoundView client={client} roomId={roomId} />;
}
if (error) {
return <ErrorView error={error} />;
}