Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Attempt to improve info modal
  • Loading branch information
regalijan committed Dec 9, 2024
1 parent 71381e9 commit 069963c
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions app/routes/events-calendar.tsx
Expand Up @@ -13,13 +13,15 @@ import {
Box,
Button,
Container,
Heading,
Modal,
ModalBody,
ModalCloseButton,
ModalContent,
ModalFooter,
ModalHeader,
ModalOverlay,
Text,
useDisclosure,
} from "@chakra-ui/react";
import { useLoaderData } from "@remix-run/react";
Expand Down Expand Up @@ -104,20 +106,31 @@ export default function () {
<ModalHeader>Event Info</ModalHeader>
<ModalCloseButton />
<ModalBody>
Host:{" "}
{
(
data.memberData.find((m) => m.id === eventData.created_by) as {
[k: string]: any;
}
)?.name
}
<Heading size="xs">Host</Heading>
<Text>
{
(
data.memberData.find(
(m) => m.id === eventData.created_by,
) as {
[k: string]: any;
}
)?.name
}
</Text>
<br />
Event Type: {eventData?.type?.toUpperCase()}
<Heading size="sm">Event Type</Heading>
<Text>{eventData?.type?.toUpperCase()}</Text>
<br />
Details: {eventData?.details}
<Heading size="sm">Details</Heading>
<Text>{eventData?.details}</Text>
<br />
Answer: {eventData?.type === "rotw" ? eventData.answer : "N/A"}
{eventData?.type === "rotw" ? (
<>
<Heading size="sm">Answer</Heading>
<Text>{eventData.answer}</Text>
</>
) : null}
</ModalBody>
<ModalFooter>
<Button onClick={onClose}>Close</Button>
Expand Down

0 comments on commit 069963c

Please sign in to comment.