diff --git a/components/LinkViews/LinkComponents/LinkCollection.tsx b/components/LinkViews/LinkComponents/LinkCollection.tsx index 4eafee7..b6e32e9 100644 --- a/components/LinkViews/LinkComponents/LinkCollection.tsx +++ b/components/LinkViews/LinkComponents/LinkCollection.tsx @@ -5,7 +5,10 @@ import { import { useRouter } from "next/router"; import React from "react"; -export default function LinkCollection({ link, collection }: { +export default function LinkCollection({ + link, + collection, +}: { link: LinkIncludingShortenedCollectionAndTags; collection: CollectionIncludingMembersAndLinkCount; }) { @@ -19,7 +22,10 @@ export default function LinkCollection({ link, collection }: { }} className="flex items-center gap-1 max-w-full w-fit hover:opacity-70 duration-100" > - +

{collection?.name}

); diff --git a/components/Modal/Collection/CollectionInfo.tsx b/components/Modal/Collection/CollectionInfo.tsx index be33707..8ee4e87 100644 --- a/components/Modal/Collection/CollectionInfo.tsx +++ b/components/Modal/Collection/CollectionInfo.tsx @@ -67,7 +67,7 @@ export default function CollectionInfo({

Color

- +
Color

- +
diff --git a/components/ModalContent/NewCollectionModal.tsx b/components/ModalContent/NewCollectionModal.tsx index 23b4344..8c68c83 100644 --- a/components/ModalContent/NewCollectionModal.tsx +++ b/components/ModalContent/NewCollectionModal.tsx @@ -27,27 +27,22 @@ export default function NewCollectionModal({ onClose }: Props) { const { addCollection } = useCollectionStore(); const submit = async () => { - if (!submitLoader) { - setSubmitLoader(true); - if (!collection) return null; + if (submitLoader) return; + if (!collection) return null; - setSubmitLoader(true); + setSubmitLoader(true); - const load = toast.loading("Creating..."); + const load = toast.loading("Creating..."); - let response; + let response = await addCollection(collection as any); + toast.dismiss(load); - response = await addCollection(collection as any); + if (response.ok) { + toast.success("Created!"); + onClose(); + } else toast.error(response.data as string); - toast.dismiss(load); - - if (response.ok) { - toast.success("Created!"); - onClose(); - } else toast.error(response.data as string); - - setSubmitLoader(false); - } + setSubmitLoader(false); }; return ( @@ -73,8 +68,10 @@ export default function NewCollectionModal({ onClose }: Props) {

Color

-
-
+
diff --git a/components/ModalContent/NewLinkModal.tsx b/components/ModalContent/NewLinkModal.tsx index 156fe28..50288f8 100644 --- a/components/ModalContent/NewLinkModal.tsx +++ b/components/ModalContent/NewLinkModal.tsx @@ -145,51 +145,60 @@ export default function NewLinkModal({ onClose }: Props) {
- {optionsExpanded ? ( -
- {/*
*/} -
-
-

Name

- setLink({ ...link, name: e.target.value })} - placeholder="e.g. Example Link" - className="bg-base-200" - /> -
+
+ {optionsExpanded ? ( +
+ {/*
*/} +
+
+

Name

+ setLink({ ...link, name: e.target.value })} + placeholder="e.g. Example Link" + className="bg-base-200" + /> +
-
-

Tags

- { - return { label: e.name, value: e.id }; - })} - /> -
+
+

Tags

+ { + return { label: e.name, value: e.id }; + })} + /> +
-
-

Description

-