From a911525aee20941d1c4e61abe0dbbc07745f26a8 Mon Sep 17 00:00:00 2001 From: 5jiji Date: Tue, 16 Dec 2025 15:43:17 +0100 Subject: [PATCH] Added fallback when no collections where found --- src/views/repo.tsx | 131 +++++++++++++++++++++++---------------------- 1 file changed, 68 insertions(+), 63 deletions(-) diff --git a/src/views/repo.tsx b/src/views/repo.tsx index bf01089..f266c94 100644 --- a/src/views/repo.tsx +++ b/src/views/repo.tsx @@ -404,75 +404,80 @@ export const RepoView = () => { />
- - filter() ? - authority.includes(filter()!) || - nsids()?.[authority].nsids.some((nsid) => - `${authority}.${nsid}`.includes(filter()!), - ) - : true, - )} + No collections found.} > - {(authority) => { - const reversedDomain = authority.split(".").reverse().join("."); - const [faviconLoaded, setFaviconLoaded] = createSignal(false); + + filter() ? + authority.includes(filter()!) || + nsids()?.[authority].nsids.some((nsid) => + `${authority}.${nsid}`.includes(filter()!), + ) + : true, + )} + > + {(authority) => { + const reversedDomain = authority.split(".").reverse().join("."); + const [faviconLoaded, setFaviconLoaded] = createSignal(false); - const isHighlighted = () => location.hash === `#collections:${authority}`; + const isHighlighted = () => location.hash === `#collections:${authority}`; - return ( -
- - - - - - - - {`${reversedDomain} setFaviconLoaded(true)} - onError={() => setFaviconLoaded(false)} - /> - -
- - filter() ? `${authority}.${nsid}`.includes(filter()!) : true, - )} + - {(nsid) => ( - - {authority} - .{nsid} - - )} - + + + + + + + {`${reversedDomain} setFaviconLoaded(true)} + onError={() => setFaviconLoaded(false)} + /> + +
+ + filter() ? `${authority}.${nsid}`.includes(filter()!) : true, + )} + > + {(nsid) => ( + + {authority} + .{nsid} + + )} + +
-
- ); - }} -
+ ); + }} +
+
-- 2.43.0