diff --git a/app/components/PinnedDocuments.tsx b/app/components/PinnedDocuments.tsx index ddfff7d13..ce466afa7 100644 --- a/app/components/PinnedDocuments.tsx +++ b/app/components/PinnedDocuments.tsx @@ -34,7 +34,7 @@ type Props = { }; function PinnedDocuments({ limit, pins, canUpdate, ...rest }: Props) { - const { documents } = useStores(); + const { documents, collections } = useStores(); const [items, setItems] = React.useState(pins.map((pin) => pin.documentId)); React.useEffect(() => { @@ -82,6 +82,10 @@ function PinnedDocuments({ limit, pins, canUpdate, ...rest }: Props) { [pins] ); + if (collections.orderedData.length === 0) { + return null; + } + return (