From fc654c239916466db6f64834b4ec9c74779e9b6e Mon Sep 17 00:00:00 2001 From: Regalijan Date: Wed, 11 Dec 2024 21:44:01 -0500 Subject: [PATCH] Remove events accordion --- app/routes/events-calendar.tsx | 80 ---------------------------------- 1 file changed, 80 deletions(-) diff --git a/app/routes/events-calendar.tsx b/app/routes/events-calendar.tsx index dbad9ed..0bb4b6b 100644 --- a/app/routes/events-calendar.tsx +++ b/app/routes/events-calendar.tsx @@ -5,12 +5,6 @@ import { Calendar, dayjsLocalizer } from "react-big-calendar"; import dayjs from "dayjs"; import { type LinksFunction } from "@remix-run/cloudflare"; import { - Accordion, - AccordionButton, - AccordionIcon, - AccordionItem, - AccordionPanel, - Box, Button, Container, Heading, @@ -90,10 +84,6 @@ export async function loader({ context }: { context: RequestContext }) { export default function () { const data = useLoaderData(); const [eventData, setEventData] = useState({} as { [k: string]: any }); - const [todayFOTD, setTodayFOTD] = useState("None"); - const [todayGameNight, setTodayGameNight] = useState("None"); - const [todayQOTD, setTodayQOTD] = useState("None"); - const [todayROTW, setTodayROTW] = useState("None"); const { isOpen, onClose, onOpen } = useDisclosure(); dayjs.extend(utc); @@ -147,82 +137,12 @@ export default function () { ); onOpen(); }} - onSelectSlot={(s) => { - const day = s.start.getUTCDate(); - const month = s.start.getUTCMonth() + 1; - - for (const [type, setter] of Object.entries({ - fotd: setTodayFOTD, - gamenight: setTodayGameNight, - qotd: setTodayQOTD, - rotw: setTodayROTW, - })) { - const event = data.eventList.find( - (ev) => ev.type === type && ev.day === day && ev.month === month, - ); - - if (!event) continue; - - setter( - event.type === "rotw" - ? `${event.details}\n\nAnswer: ${event.answer}` - : (event.details as string), - ); - } - }} popup startAccessor={(event) => new Date(event.start)} style={{ height: 500 }} toolbar={false} views={["month"]} /> - - -

- - - Fact of the Day - - - -

- - {todayFOTD} -
-
-
- -

- - - Gamenight - - - -

- {todayGameNight} -
- -

- - - Riddle of the Week - - -

- {todayROTW} -
- -

- - - Question of the Day - - -

- {todayQOTD} -
-
); }