From ef549f2e5086ad834f31b4ff2d3bb5374f322ae0 Mon Sep 17 00:00:00 2001 From: Haydn Ewers <27211+haydn@users.noreply.github.com> Date: Wed, 3 Sep 2025 13:05:25 +1000 Subject: [PATCH] show loading state on sources --- src/app/Source.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/Source.tsx b/src/app/Source.tsx index 1220d92..3450de0 100644 --- a/src/app/Source.tsx +++ b/src/app/Source.tsx @@ -23,7 +23,7 @@ const Source = ({ actions, config }: Props) => { const sourceUrl = useMemo(() => sourceUrlFromConfig(config, location), [config, location]); - const { data, error } = useSWR(sourceUrl, sourceFetcher); + const { data, error, isLoading } = useSWR(sourceUrl, sourceFetcher); return (
{ ) : null} {config.name}{" "} - ({data?.items.length ?? 0}) + + {isLoading ? : `(${data?.items.length ?? 0})`} + {error ? ( <> {" "} -- 2.51.2