Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joaotomaspinheiro committed Dec 29, 2024
1 parent 7d83ff1 commit c8dbbbb
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,7 @@ function AddToCart(props: {

const today = useMemo(() => new Date(), []);

if (
!("releaseDate" in props.game) ||
("releaseDate" in props.game && isAfter(props.game.releaseDate, today))
) {
if (!props.game.isActive) {
return (
<Tooltip>
<TooltipTrigger>
Expand All @@ -372,13 +369,16 @@ function AddToCart(props: {
</Button>
</TooltipTrigger>
<TooltipContent side="bottom">
This game has not been released
This game is unlisted from the store
</TooltipContent>
</Tooltip>
);
}

if (!props.game.isActive) {
if (
!("releaseDate" in props.game) ||
("releaseDate" in props.game && isAfter(props.game.releaseDate, today))
) {
return (
<Tooltip>
<TooltipTrigger>
Expand All @@ -390,7 +390,7 @@ function AddToCart(props: {
</Button>
</TooltipTrigger>
<TooltipContent side="bottom">
This game is unlisted from the store
This game has not been released
</TooltipContent>
</Tooltip>
);
Expand Down

0 comments on commit c8dbbbb

Please sign in to comment.