Skip to content

Commit

Permalink
Set upper limit on quantity of items can buy
Browse files Browse the repository at this point in the history
  • Loading branch information
WishingWell13 committed Jan 23, 2024
1 parent 35bada4 commit 78c5df2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/store/AddCartButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const AddCartButton = ({
}: AddCartButtonProps) => {
const myID = useId();

const maxCanBuy = Math.min(lifetimeRemaining, monthlyRemaining);
const maxCanBuy = Math.min(20, Math.min(lifetimeRemaining, monthlyRemaining));

const validText = inStock ? (
<p className={styles.valid}>This item is in stock.</p>
Expand Down

0 comments on commit 78c5df2

Please sign in to comment.