diff --git a/components/Dropdown.tsx b/components/Dropdown.tsx
index d1944c8..90371d8 100644
--- a/components/Dropdown.tsx
+++ b/components/Dropdown.tsx
@@ -61,8 +61,7 @@ export default function Dropdown({
}, [points, dropdownHeight]);
return (
- !points ||
- (pos && (
+ (!points || pos) && (
{
setDropdownHeight(e.height);
@@ -104,6 +103,6 @@ export default function Dropdown({
);
})}
- ))
+ )
);
}
diff --git a/components/InputSelect/CollectionSelection.tsx b/components/InputSelect/CollectionSelection.tsx
index 64c25d7..81bef39 100644
--- a/components/InputSelect/CollectionSelection.tsx
+++ b/components/InputSelect/CollectionSelection.tsx
@@ -104,7 +104,7 @@ export default function CollectionSelection({
onChange={onChange}
options={options}
styles={styles}
- defaultValue={showDefaultValue && defaultValue}
+ defaultValue={showDefaultValue ? defaultValue : null}
components={{
Option: customOption,
}}
@@ -120,7 +120,7 @@ export default function CollectionSelection({
onChange={onChange}
options={options}
styles={styles}
- defaultValue={showDefaultValue && defaultValue}
+ defaultValue={showDefaultValue ? defaultValue : null}
components={{
Option: customOption,
}}
diff --git a/components/LinkViews/LinkComponents/LinkActions.tsx b/components/LinkViews/LinkComponents/LinkActions.tsx
index 9081e47..f93f969 100644
--- a/components/LinkViews/LinkComponents/LinkActions.tsx
+++ b/components/LinkViews/LinkComponents/LinkActions.tsx
@@ -12,22 +12,20 @@ import { useTranslation } from "next-i18next";
import { useUser } from "@/hooks/store/user";
import { useDeleteLink, useUpdateLink } from "@/hooks/store/links";
import toast from "react-hot-toast";
+import LinkDetailModal from "@/components/ModalContent/LinkDetailModal";
+import { useRouter } from "next/router";
type Props = {
link: LinkIncludingShortenedCollectionAndTags;
collection: CollectionIncludingMembersAndLinkCount;
position?: string;
- toggleShowInfo?: () => void;
- linkInfo?: boolean;
alignToTop?: boolean;
flipDropdown?: boolean;
};
export default function LinkActions({
link,
- toggleShowInfo,
position,
- linkInfo,
alignToTop,
flipDropdown,
}: Props) {
@@ -36,6 +34,7 @@ export default function LinkActions({
const permissions = usePermissions(link.collection.id as number);
const [editLinkModal, setEditLinkModal] = useState(false);
+ const [linkDetailModal, setLinkDetailModal] = useState(false);
const [deleteLinkModal, setDeleteLinkModal] = useState(false);
const [preservedFormatsModal, setPreservedFormatsModal] = useState(false);
@@ -70,120 +69,137 @@ export default function LinkActions({
);
};
+ const router = useRouter();
+
+ const isPublicRoute = router.pathname.startsWith("/public") ? true : false;
+
return (
<>
-
+ {isPublicRoute ? (
setLinkDetailModal(true)}
>
-
+
+
+
-
+
+ )}
+
+
+ )}
{editLinkModal && (
setEditLinkModal(false)}
@@ -202,6 +218,13 @@ export default function LinkActions({
link={link}
/>
)}
+ {linkDetailModal && (
+ setLinkDetailModal(false)}
+ onEdit={() => setEditLinkModal(true)}
+ link={link}
+ />
+ )}
>
);
}
diff --git a/components/ModalContent/EditCollectionSharingModal.tsx b/components/ModalContent/EditCollectionSharingModal.tsx
index 9f84cb1..04c44b0 100644
--- a/components/ModalContent/EditCollectionSharingModal.tsx
+++ b/components/ModalContent/EditCollectionSharingModal.tsx
@@ -132,7 +132,7 @@ export default function EditCollectionSharingModal({
)}
{collection.isPublic && (
-
+
{t("sharable_link_guide")}
{publicCollectionURL}
diff --git a/components/ModalContent/UploadFileModal.tsx b/components/ModalContent/UploadFileModal.tsx
index 1627bb1..cf5cf47 100644
--- a/components/ModalContent/UploadFileModal.tsx
+++ b/components/ModalContent/UploadFileModal.tsx
@@ -150,7 +150,7 @@ export default function UploadFileModal({ onClose }: Props) {