diff --git a/components/CollectionListing.tsx b/components/CollectionListing.tsx index f118184..8abc080 100644 --- a/components/CollectionListing.tsx +++ b/components/CollectionListing.tsx @@ -25,7 +25,7 @@ interface ExtendedTreeItem extends TreeItem { const CollectionListing = () => { const { t } = useTranslation(); const updateCollection = useUpdateCollection(); - const { data: collections = [] } = useCollections(); + const { data: collections = [], isLoading } = useCollections(); const { data: user = {} } = useUser(); const updateUser = useUpdateUser(); @@ -204,7 +204,15 @@ const CollectionListing = () => { } }; - if (!tree) { + if (isLoading) { + return ( +
{t("you_have_no_collections")}
diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx
index dc15c61..645fda4 100644
--- a/components/Sidebar.tsx
+++ b/components/Sidebar.tsx
@@ -24,7 +24,7 @@ export default function Sidebar({ className }: { className?: string }) {
const { data: collections } = useCollections();
- const { data: tags = [] } = useTags();
+ const { data: tags = [], isLoading } = useTags();
const [active, setActive] = useState("");
const router = useRouter();
@@ -128,7 +128,13 @@ export default function Sidebar({ className }: { className?: string }) {
leaveTo="transform opacity-0 -translate-y-3"
>