update missing collection color picker icon
This commit is contained in:
parent
e9acb548bf
commit
feda50464c
|
@ -27,27 +27,22 @@ export default function NewCollectionModal({ onClose }: Props) {
|
||||||
const { addCollection } = useCollectionStore();
|
const { addCollection } = useCollectionStore();
|
||||||
|
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
if (!submitLoader) {
|
if (submitLoader) return;
|
||||||
setSubmitLoader(true);
|
if (!collection) return null;
|
||||||
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);
|
setSubmitLoader(false);
|
||||||
|
|
||||||
if (response.ok) {
|
|
||||||
toast.success("Created!");
|
|
||||||
onClose();
|
|
||||||
} else toast.error(response.data as string);
|
|
||||||
|
|
||||||
setSubmitLoader(false);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -73,8 +68,7 @@ export default function NewCollectionModal({ onClose }: Props) {
|
||||||
<p className="w-full mb-2">Color</p>
|
<p className="w-full mb-2">Color</p>
|
||||||
<div className="color-picker flex justify-between">
|
<div className="color-picker flex justify-between">
|
||||||
<div className="flex flex-col gap-2 items-center w-32">
|
<div className="flex flex-col gap-2 items-center w-32">
|
||||||
<div style={{ color: collection.color }}>
|
<i className={"bi-folder2 text-5xl"} style={{ color: collection.color }}></i>
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
className="btn btn-ghost btn-xs"
|
className="btn btn-ghost btn-xs"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
|
|
Ŝarĝante…
Reference in New Issue