From 48f34795da12b7864ea333070e109ead7d8bb28b Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Sat, 23 Jan 2021 12:34:16 -0500 Subject: [PATCH] links: return submit if no 'first item' Fixes unfiled bug where creating a new collection returned a blank screen. --- pkg/interface/src/views/apps/links/LinkWindow.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkg/interface/src/views/apps/links/LinkWindow.tsx b/pkg/interface/src/views/apps/links/LinkWindow.tsx index abc85d672..71ab000d6 100644 --- a/pkg/interface/src/views/apps/links/LinkWindow.tsx +++ b/pkg/interface/src/views/apps/links/LinkWindow.tsx @@ -48,10 +48,9 @@ export function LinkWindow(props: LinkWindowProps) { }, [graph.size]); const first = graph.peekLargest()?.[0]; - const [,,ship, name] = association['app-path'].split('/'); - const style = useMemo(() => + const style = useMemo(() => ({ height: "100%", width: "100%", @@ -60,6 +59,14 @@ export function LinkWindow(props: LinkWindowProps) { alignItems: 'center' }), []); + if (!first) { + return ( + + + + ); + } + return ( (virtualList.current = l ?? undefined)} @@ -82,7 +89,7 @@ export function LinkWindow(props: LinkWindowProps) { if(index.eq(first ?? bigInt.zero)) { return ( <> - +