From 9d110f237b00c929108f35c40697b7cea5c3ca00 Mon Sep 17 00:00:00 2001 From: "Shankar D. Warang" Date: Wed, 1 Nov 2023 09:34:30 +0530 Subject: [PATCH 1/7] feat: GiftDrop page --- pages/giftdrop.tsx | 104 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 pages/giftdrop.tsx diff --git a/pages/giftdrop.tsx b/pages/giftdrop.tsx new file mode 100644 index 0000000..f1a4aa6 --- /dev/null +++ b/pages/giftdrop.tsx @@ -0,0 +1,104 @@ +import { Listbox } from '@headlessui/react'; +import { useState } from 'react'; +import IconArrow from 'remixicon/icons/Arrows/arrow-down-s-line.svg'; + +const WidgetCampaign = [ + { + index: 1, + campaign: 'Halloween Edition', + src: 'https://embed.ipfscdn.io/ipfs/bafybeigdie2yyiazou7grjowoevmuip6akk33nqb55vrpezqdwfssrxyfy/erc1155.html?contract=0xcBD6701C3313aC76c529468957Fc2137484A4A51&chain=%7B%22name%22%3A%22Edgeware+EdgeEVM+Mainnet%22%2C%22chain%22%3A%22EDG%22%2C%22rpc%22%3A%5B%22https%3A%2F%2Fedgeware-edgeevm.rpc.thirdweb.com%2F%24%7BTHIRDWEB_API_KEY%7D%22%5D%2C%22nativeCurrency%22%3A%7B%22name%22%3A%22Edgeware%22%2C%22symbol%22%3A%22EDG%22%2C%22decimals%22%3A18%7D%2C%22shortName%22%3A%22edg%22%2C%22chainId%22%3A2021%2C%22testnet%22%3Afalse%2C%22slug%22%3A%22edgeware-edgeevm%22%2C%22icon%22%3A%7B%22url%22%3A%22ipfs%3A%2F%2FQmS3ERgAKYTmV7bSWcUPSvrrCC9wHQYxtZqEQYx9Rw4RGA%22%2C%22width%22%3A352%2C%22height%22%3A304%2C%22format%22%3A%22png%22%7D%7D&clientId=57b1f3ff173c0acef018fbca1356a7af&tokenId=0&theme=dark&primaryColor=red', + }, +]; + +const maxIndex = Math.max(...WidgetCampaign.map((m) => m.index)); + +export default function SocietyPage() { + const [activeIndex, setActiveIndex] = useState(maxIndex); + + const currentWidget = WidgetCampaign.find((m) => m.index === activeIndex); + const dropdownOptions = WidgetCampaign.map((m) => m.index).reverse(); + + return ( + <> +
+

GiftDrops

+

+ GiftDrop is a series of free commemorative mint drops for the EDGizens! + Flex your community presence through your GiftDrop NFTs collection 馃槑 +

+

+ Mint your free GiftDrop NFT today: +

+
+ +
+
+ + + {activeIndex} + + + + {dropdownOptions.map((o, index) => ( + + {({ active }) => (active ? {o} : {o})} + + ))} + + +
+
+