adding change option

This commit is contained in:
zmeyer44 2023-11-04 12:12:55 -04:00
parent 36a435a757
commit 88f0972dff

View File

@ -2,6 +2,7 @@ import { useState } from "react";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { HiOutlineLightningBolt } from "react-icons/hi"; import { HiOutlineLightningBolt } from "react-icons/hi";
import { RiRepeatFill } from "react-icons/ri";
import RSVPModal from "@/components/Modals/RSVP"; import RSVPModal from "@/components/Modals/RSVP";
import ConfirmModal from "@/components/Modals/Confirm"; import ConfirmModal from "@/components/Modals/Confirm";
@ -89,6 +90,7 @@ export default function RSVPButton({ event }: RSVPButtonProps) {
if (rsvpEvent) { if (rsvpEvent) {
const rsvpResponse = getTagValues("l", rsvpEvent.tags); const rsvpResponse = getTagValues("l", rsvpEvent.tags);
return ( return (
<div className="flex items-center">
<Button disabled> <Button disabled>
{rsvpResponse === "accepted" {rsvpResponse === "accepted"
? "Going" ? "Going"
@ -96,6 +98,16 @@ export default function RSVPButton({ event }: RSVPButtonProps) {
? "Tentative" ? "Tentative"
: "Not Going"} : "Not Going"}
</Button> </Button>
<Button
onClick={() =>
modal?.show(<RSVPModal eventReference={eventReference} />)
}
variant={"secondary"}
size="icon"
>
<RiRepeatFill className="h-5 w-5" />
</Button>
</div>
); );
} else { } else {
return ( return (