diff --git a/app/components/Sidebar/components/Collections.tsx b/app/components/Sidebar/components/Collections.tsx index 833e62d940..c12c580da8 100644 --- a/app/components/Sidebar/components/Collections.tsx +++ b/app/components/Sidebar/components/Collections.tsx @@ -18,10 +18,14 @@ import PlaceholderCollections from "./PlaceholderCollections"; import Relative from "./Relative"; import SidebarAction from "./SidebarAction"; import SidebarContext from "./SidebarContext"; +import SidebarLink from "./SidebarLink"; +import Text from "@shared/components/Text"; +import usePolicy from "~/hooks/usePolicy"; function Collections() { - const { documents, collections } = useStores(); + const { documents, auth, collections } = useStores(); const { t } = useTranslation(); + const can = usePolicy(auth.team?.id); const orderedCollections = collections.allActive; const params = useMemo( @@ -57,7 +61,7 @@ function Collections() { options={params} aria-label={t("Collections")} - items={collections.allActive} + items={orderedCollections} loading={} heading={ isDraggingAnyCollection ? ( @@ -68,6 +72,20 @@ function Collections() { /> ) : undefined } + empty={ + // No need for empty state if we're displaying the createCollection action + can.createCollection ? null : ( + + {t("No collections")} + + } + onClick={() => {}} + depth={1.5} + /> + ) + } renderError={(props) => } renderItem={(item, index) => (