diff --git a/components/LinkList.tsx b/components/LinkList.tsx index 432da8f..01ed6c7 100644 --- a/components/LinkList.tsx +++ b/components/LinkList.tsx @@ -19,6 +19,7 @@ import Dropdown from "./Dropdown"; import useLinkStore from "@/store/links"; import Modal from "./Modal"; import EditLink from "./Modal/EditLink"; +import Link from "next/link"; export default function ({ link, @@ -57,7 +58,7 @@ export default function ({ width={32} height={32} alt="" - className="select-none mt-3 z-10 rounded-md" + className="select-none mt-3 z-10 rounded-md shadow" draggable="false" onError={(e) => { const target = e.target as HTMLElement; @@ -84,18 +85,20 @@ export default function ({
{link.title}
{link.collection.name}
-{link.collection.name}
+- # {e.name} -
+ ++ # {e.name} +
+ ))}Delete Collection
diff --git a/components/Modal/EditCollection.tsx b/components/Modal/EditCollection.tsx index 444ec7e..2b8d116 100644 --- a/components/Modal/EditCollection.tsx +++ b/components/Modal/EditCollection.tsx @@ -5,11 +5,17 @@ import React, { useState } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faClose, faPenToSquare } from "@fortawesome/free-solid-svg-icons"; +import { + faClose, + faPenToSquare, + faTrashCan, +} from "@fortawesome/free-solid-svg-icons"; import useCollectionStore from "@/store/collections"; import { ExtendedCollection } from "@/types/global"; import { useSession } from "next-auth/react"; import getPublicUserDataByEmail from "@/lib/client/getPublicUserDataByEmail"; +import Modal from "@/components/Modal"; +import DeleteCollection from "@/components/Modal/DeleteCollection"; type Props = { toggleCollectionModal: Function; @@ -27,6 +33,12 @@ export default function EditCollection({ const { updateCollection } = useCollectionStore(); + const [deleteCollectionModal, setDeleteCollectionModal] = useState(false); + + const toggleDeleteCollectionModal = () => { + setDeleteCollectionModal(!deleteCollectionModal); + }; + const session = useSession(); const submit = async () => { @@ -250,13 +262,41 @@ export default function EditCollection({ ); })} -
OR
+ +OR
+ +{text}
+{text}
@@ -27,16 +36,48 @@ export default function () {
-All Links
++ All Links +
All Collections
++ All Collections +