Skip to content

Commit

Permalink
Refactor CTAButton component to handle ticket availability logic more…
Browse files Browse the repository at this point in the history
… accurately
  • Loading branch information
grayashh committed Sep 9, 2024
1 parent 278c301 commit 1f4d25a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/components/CTAButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export default function CTAButton() {
return "before";
} else if (today < EVENT_END_TIMESTAMP && today > TICKET_OPEN_TIMESTAMP) {
return "sale";
} else if (process.env.NEXT_PUBLIC_TICKET_SOLDOUT) {
} else if (
today < EVENT_END_TIMESTAMP &&
process.env.NEXT_PUBLIC_TICKET_SOLDOUT === "true"
) {
return "soldout";
} else {
return "end";
Expand Down

0 comments on commit 1f4d25a

Please sign in to comment.