many bug fixes + add links and collections together + more changes

This commit is contained in:
daniel31x13
2023-12-01 16:29:17 -05:00
parent a3c6d9b42e
commit a36769c521
27 changed files with 169 additions and 190 deletions
@@ -1,9 +1,9 @@
import useCollectionStore from "@/store/collections";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import Select from "react-select";
import { styles } from "./styles";
import { Options } from "./types";
import CreatableSelect from "react-select/creatable";
type Props = {
onChange: any;
@@ -13,9 +13,14 @@ type Props = {
value?: number;
}
| undefined;
id?: string;
};
export default function CollectionSelection({ onChange, defaultValue }: Props) {
export default function CollectionSelection({
onChange,
defaultValue,
id,
}: Props) {
const { collections } = useCollectionStore();
const router = useRouter();
@@ -43,7 +48,8 @@ export default function CollectionSelection({ onChange, defaultValue }: Props) {
}, [collections]);
return (
<Select
<CreatableSelect
key={id || "key"}
isClearable={false}
className="react-select-container"
classNamePrefix="react-select"