From e70a2211e9c85d49c131fba2dbd7a4db61ad47e7 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Sat, 2 Mar 2024 11:07:48 +0000 Subject: ui: Fix sidebar list spinner --- .../bookmarks/components/BookmarksGrid.tsx | 5 +++- packages/web/app/dashboard/components/AllLists.tsx | 28 +++++++++++----------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/packages/web/app/dashboard/bookmarks/components/BookmarksGrid.tsx b/packages/web/app/dashboard/bookmarks/components/BookmarksGrid.tsx index de3c96d1..433649af 100644 --- a/packages/web/app/dashboard/bookmarks/components/BookmarksGrid.tsx +++ b/packages/web/app/dashboard/bookmarks/components/BookmarksGrid.tsx @@ -17,7 +17,10 @@ function renderBookmark(bookmark: ZBookmark) { break; } return ( - + {comp} ); diff --git a/packages/web/app/dashboard/components/AllLists.tsx b/packages/web/app/dashboard/components/AllLists.tsx index 5b706cbe..78d88654 100644 --- a/packages/web/app/dashboard/components/AllLists.tsx +++ b/packages/web/app/dashboard/components/AllLists.tsx @@ -12,6 +12,10 @@ export default function AllLists() { const { setOpen } = useNewListModal(); + if (!lists) { + return ; + } + return (
    @@ -21,20 +25,16 @@ export default function AllLists() { - {lists && lists.lists.length == 0 &&
  • No lists
  • } - {lists ? ( - lists.lists.map((l) => ( - {l.icon}} - name={l.name} - path={`/dashboard/lists/${l.id}`} - className="py-0.5" - /> - )) - ) : ( - - )} + {lists.lists.length == 0 &&
  • No lists
  • } + {lists.lists.map((l) => ( + {l.icon}} + name={l.name} + path={`/dashboard/lists/${l.id}`} + className="py-0.5" + /> + ))}
); } -- cgit v1.2.3-70-g09d2