diff --git a/client/web/src/components/app.tsx b/client/web/src/components/app.tsx index 26c17aae3..58769913b 100644 --- a/client/web/src/components/app.tsx +++ b/client/web/src/components/app.tsx @@ -16,6 +16,7 @@ import useNodeData, { featureDescription, NodeData, } from "src/hooks/node-data" +import LoadingDots from "src/ui/loading-dots" import { Link, Route, Router, Switch, useLocation } from "wouter" export default function App() { @@ -24,7 +25,7 @@ export default function App() { return (
{loadingAuth || !auth ? ( -
Loading...
// TODO(sonia): add a loading view + ) : ( )} @@ -45,7 +46,7 @@ function WebClient({ }, [auth, refreshData]) return !data ? ( -
Loading...
+ ) : data.Status === "NeedsLogin" || data.Status === "NoState" || data.Status === "Stopped" ? ( @@ -157,3 +158,13 @@ function Header({ ) } + +/** + * LoadingView fills its container with small animated loading dots + * in the center. + */ +export function LoadingView() { + return ( + + ) +}