From b88de28f2e3f6c80641eb54940b3ba0c9261b8f1 Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 Date: Fri, 21 Jul 2023 20:27:47 -0400 Subject: [PATCH] Add error state for remote fetch page --- src/shared/components/remote-fetch.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/shared/components/remote-fetch.tsx b/src/shared/components/remote-fetch.tsx index 3ff219cd..da3b0c56 100644 --- a/src/shared/components/remote-fetch.tsx +++ b/src/shared/components/remote-fetch.tsx @@ -95,6 +95,7 @@ export class RemoteFetch extends Component { const status = "loading" as "success" | "loading" | "empty"; const { uri } = getRemoteFetchQueryParams(); + const remoteCommunityName = uri ? uriToQuery(uri) : "remote community"; switch (status) { case "success": { @@ -112,7 +113,7 @@ export class RemoteFetch extends Component { return ( <>

- Fetching {uri ? uriToQuery(uri) : "remote community"} + Fetching {remoteCommunityName}

@@ -121,6 +122,14 @@ export class RemoteFetch extends Component { ); } + + default: { + return ( + <> +

Could not fetch {remoteCommunityName}

+ + ); + } } }