Cleanup error/loading screens

This commit is contained in:
Robert Long
2021-12-10 16:42:18 -08:00
parent aa988e9f4a
commit 940706bed0
12 changed files with 77 additions and 530 deletions

View File

@@ -29,7 +29,7 @@ import { UserMenu } from "./UserMenu";
import { Button } from "./button";
import { CallList } from "./CallList";
import classNames from "classnames";
import { ErrorModal } from "./ErrorModal";
import { ErrorView, LoadingView } from "./FullScreenView";
export function Home() {
const { isAuthenticated, isGuest, loading, error, client } = useClient();
@@ -64,9 +64,9 @@ export function Home() {
);
if (loading) {
return <div>Loading...</div>;
} else if (error) {
return <ErrorModal error={error} />;
return <LoadingView />;
} else if (error || createRoomError) {
return <ErrorView error={error || createRoomError} />;
} else if (!isAuthenticated || isGuest) {
return (
<UnregisteredView