From e22e680d801b0dd08131cb841f9d07a0dac36eda Mon Sep 17 00:00:00 2001 From: Guo Hong <1352118502@qq.com> Date: Tue, 8 Oct 2024 15:19:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AF=A6=E6=83=85=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/ui/pop-card.svg | 9 ++++++ assets/ui/pop-label.svg | 9 ++++++ components/MainUI/Store.tsx | 3 +- components/MainUI/storeItem.tsx | 43 +++++++++++++++------------- components/itemDetailModal/index.tsx | 33 +++++++++++---------- 5 files changed, 60 insertions(+), 37 deletions(-) create mode 100644 assets/ui/pop-card.svg create mode 100644 assets/ui/pop-label.svg diff --git a/assets/ui/pop-card.svg b/assets/ui/pop-card.svg new file mode 100644 index 0000000..86003fb --- /dev/null +++ b/assets/ui/pop-card.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/ui/pop-label.svg b/assets/ui/pop-label.svg new file mode 100644 index 0000000..2621657 --- /dev/null +++ b/assets/ui/pop-label.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/components/MainUI/Store.tsx b/components/MainUI/Store.tsx index 9b5256b..296839f 100644 --- a/components/MainUI/Store.tsx +++ b/components/MainUI/Store.tsx @@ -4,7 +4,6 @@ import { TraitMetadata } from "@/lib/traits"; import { getTraitMetadata } from "@/app/api/traits"; import StoreItem from "@/components/MainUI/storeItem"; import LoadingAnimation from "@/components/loadingAnimation"; -import { div } from "framer-motion/client"; export default function Store({ onClose }: { onClose: () => void }) { const [metadata, setMetadata] = useState([]); @@ -23,7 +22,7 @@ export default function Store({ onClose }: { onClose: () => void }) { {dataLoading ? ( ) : ( - + {metadata.map((data, index) => ( - - - - - {/* + + + + + + {/* {name} */} - {/* {owned ? ( + {/* {owned ? ( Owned @@ -66,6 +62,13 @@ export default function StoreItem({ image, name, owned }: StoreItemProps) { )} */} + + handleItemClick()} + > + Buy + {isModalOpen && ( diff --git a/components/itemDetailModal/index.tsx b/components/itemDetailModal/index.tsx index 0495ad5..4252cc6 100644 --- a/components/itemDetailModal/index.tsx +++ b/components/itemDetailModal/index.tsx @@ -1,5 +1,6 @@ import Image from "next/image"; import CloseIcon from "@/assets/icons/close.svg"; +import { div } from "framer-motion/client"; interface ItemDetailModalProps { image: string; @@ -36,32 +37,34 @@ export default function ItemDetailModal({ Detail - - {name} + + {name} 💰 {price} - - {owned ? ( - - Equip - - ) : ( - - Buy - - )} - + {owned ? ( + + + Equip + + + ) : ( + + + Buy + + + )}
Buy
Detail
{price}
Equip