diff --git a/components/CollectionCard.tsx b/components/CollectionCard.tsx
index 60b12883..7bb05288 100644
--- a/components/CollectionCard.tsx
+++ b/components/CollectionCard.tsx
@@ -11,8 +11,8 @@ import useLinkStore from "@/store/links";
import Dropdown from "./Dropdown";
import { useState } from "react";
import Modal from "@/components/Modal";
-import CollectionModal from "@/components/Modal/CollectionModal";
-import DeleteCollection from "@/components/Modal/DeleteCollection";
+import CollectionInfo from "@/components/Modal/Collection/CollectionInfo";
+import DeleteCollection from "@/components/Modal/Collection/DeleteCollection";
import ProfilePhoto from "./ProfilePhoto";
export default function ({
@@ -63,7 +63,7 @@ export default function ({
{collection.members
- .sort((a, b) => (a.user.id as number) - (b.user.id as number))
+ .sort((a, b) => (a.userId as number) - (b.userId as number))
.map((e, i) => {
return (
-
+// This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.
+// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License along with this program. If not, see .
+
+import React, { useState } from "react";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import {
+ faClose,
+ faPenToSquare,
+ faPlus,
+ faTrashCan,
+ faUser,
+ faUserPlus,
+} from "@fortawesome/free-solid-svg-icons";
+import useCollectionStore from "@/store/collections";
+import { CollectionIncludingMembers, Member } from "@/types/global";
+import { useSession } from "next-auth/react";
+import Modal from "@/components/Modal";
+import DeleteCollection from "@/components/Modal/Collection/DeleteCollection";
+import RequiredBadge from "../../RequiredBadge";
+import addMemberToCollection from "@/lib/client/addMemberToCollection";
+import ImageWithFallback from "../../ImageWithFallback";
+import Checkbox from "../../Checkbox";
+
+type Props = {
+ toggleCollectionModal: Function;
+ activeCollection: CollectionIncludingMembers;
+ method: "CREATE" | "UPDATE";
+};
+
+export default function CollectionInfo({
+ toggleCollectionModal,
+ activeCollection,
+ method,
+}: Props) {
+ const [collection, setCollection] =
+ useState(activeCollection);
+
+ const { updateCollection, addCollection } = useCollectionStore();
+
+ const submit = async () => {
+ if (!collection) return null;
+
+ let response = null;
+
+ if (method === "CREATE") response = await addCollection(collection);
+ else if (method === "UPDATE") response = await updateCollection(collection);
+ else console.log("Unknown method.");
+
+ if (response) toggleCollectionModal();
+ };
+
+ return (
+