tab-seperated modals + eslint fix + much more bug fixed and improvements

This commit is contained in:
Daniel
2023-06-10 02:01:14 +03:30
parent dcdef77387
commit 2df4aad077
64 changed files with 713 additions and 373 deletions
+5 -10
View File
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import { Dispatch, SetStateAction } from "react";
import {
faFolder,
faPenToSquare,
@@ -13,18 +13,17 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
type Props = {
toggleCollectionModal: Function;
activeCollection: CollectionIncludingMembers;
setCollection: Dispatch<SetStateAction<CollectionIncludingMembers>>;
collection: CollectionIncludingMembers;
method: "CREATE" | "UPDATE";
};
export default function CollectionInfo({
toggleCollectionModal,
activeCollection,
setCollection,
collection,
method,
}: Props) {
const [collection, setCollection] =
useState<CollectionIncludingMembers>(activeCollection);
const { updateCollection, addCollection } = useCollectionStore();
const submit = async () => {
@@ -41,10 +40,6 @@ export default function CollectionInfo({
return (
<div className="flex flex-col gap-3 sm:w-[35rem] w-80">
<p className="text-xl text-sky-500 mb-2 text-center">
{method === "CREATE" ? "Add" : "Edit"} Collection
</p>
<div className="flex flex-col sm:flex-row gap-3">
<div className="w-full">
<p className="text-sm text-sky-500 mb-2">