adding change option
This commit is contained in:
parent
36a435a757
commit
88f0972dff
@ -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,13 +90,24 @@ export default function RSVPButton({ event }: RSVPButtonProps) {
|
|||||||
if (rsvpEvent) {
|
if (rsvpEvent) {
|
||||||
const rsvpResponse = getTagValues("l", rsvpEvent.tags);
|
const rsvpResponse = getTagValues("l", rsvpEvent.tags);
|
||||||
return (
|
return (
|
||||||
<Button disabled>
|
<div className="flex items-center">
|
||||||
{rsvpResponse === "accepted"
|
<Button disabled>
|
||||||
? "Going"
|
{rsvpResponse === "accepted"
|
||||||
: rsvpResponse === "tentative"
|
? "Going"
|
||||||
? "Tentative"
|
: rsvpResponse === "tentative"
|
||||||
: "Not Going"}
|
? "Tentative"
|
||||||
</Button>
|
: "Not Going"}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() =>
|
||||||
|
modal?.show(<RSVPModal eventReference={eventReference} />)
|
||||||
|
}
|
||||||
|
variant={"secondary"}
|
||||||
|
size="icon"
|
||||||
|
>
|
||||||
|
<RiRepeatFill className="h-5 w-5" />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user