Skip to content

Commit

Permalink
Fix CTAButton component to handle ticket availability
Browse files Browse the repository at this point in the history
  • Loading branch information
grayashh committed Sep 9, 2024
1 parent b1a65cf commit d5ac24e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/components/CTAButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export default function CTAButton() {
const today = Date.now();
if (today < TICKET_OPEN_TIMESTAMP) {
return "before";
} else if (today < EVENT_END_TIMESTAMP && today > TICKET_OPEN_TIMESTAMP) {
} else if (
today < EVENT_END_TIMESTAMP &&
today > TICKET_OPEN_TIMESTAMP &&
process.env.NEXT_PUBLIC_TICKET_SOLDOUT !== "true"
) {
return "sale";
} else if (
today < EVENT_END_TIMESTAMP &&
Expand Down

0 comments on commit d5ac24e

Please sign in to comment.