From fe7733d0797b405220bae89a71299adf6f0d991d Mon Sep 17 00:00:00 2001 From: Jan Date: Fri, 29 Sep 2023 18:59:52 +0100 Subject: [PATCH] Update month selector for CSP page --- pages/csp.tsx | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/pages/csp.tsx b/pages/csp.tsx index e0dd8c4..5ca912d 100644 --- a/pages/csp.tsx +++ b/pages/csp.tsx @@ -1,4 +1,6 @@ +import { Listbox } from '@headlessui/react'; import { useState } from 'react'; +import IconArrow from 'remixicon/icons/Arrows/arrow-down-s-line.svg'; const WidgetMonths = [ { @@ -28,6 +30,7 @@ export default function SocietyPage() { const [activeMonth, setActiveMonth] = useState(currentMonth); const currentWidget = WidgetMonths.find((m) => m.month === activeMonth); + const dropdownOptions = WidgetMonths.map((m) => m.month).reverse(); return ( <> @@ -40,25 +43,29 @@ export default function SocietyPage() { for Edgeware contributors who are consistent with their contributions.

- Click on the month below to mint the corresponding CSP NFT(s): + Select the month below to mint the corresponding CSP NFT(s):

-
- {WidgetMonths.map((m) => ( - - ))} +
+ + + {activeMonth} + + + + {dropdownOptions.map((o) => ( + + {({ active }) => (active ? {o} : {o})} + + ))} + +