diff --git a/app/components/DocumentCard.tsx b/app/components/DocumentCard.tsx
index b3e3eac05..8e61db558 100644
--- a/app/components/DocumentCard.tsx
+++ b/app/components/DocumentCard.tsx
@@ -18,15 +18,20 @@ import CollectionIcon from "./CollectionIcon";
import Tooltip from "./Tooltip";
type Props = {
+ /** The pin record */
pin: Pin | undefined;
+ /** The document related to the pin */
document: Document;
+ /** Whether the user has permission to delete or reorder the pin */
canUpdatePin?: boolean;
+ /** Whether this pin can be reordered by dragging */
+ isDraggable?: boolean;
};
function DocumentCard(props: Props) {
const { t } = useTranslation();
const { collections } = useStores();
- const { document, pin, canUpdatePin } = props;
+ const { document, pin, canUpdatePin, isDraggable } = props;
const collection = collections.get(document.collectionId);
const {
attributes,
@@ -105,9 +110,11 @@ function DocumentCard(props: Props) {
)}
-
- :::
-
+ {isDraggable && (
+
+ :::
+
+ )}
)}
diff --git a/app/components/PinnedDocuments.tsx b/app/components/PinnedDocuments.tsx
index 7ef31d01d..ddfff7d13 100644
--- a/app/components/PinnedDocuments.tsx
+++ b/app/components/PinnedDocuments.tsx
@@ -101,6 +101,7 @@ function PinnedDocuments({ limit, pins, canUpdate, ...rest }: Props) {
key={documentId}
document={document}
canUpdatePin={canUpdate}
+ isDraggable={items.length > 1}
pin={pin}
{...rest}
/>