MCPcopy Create free account
hub / github.com/Krycha94/fullstack-nextjs-ecommerce / decrease

Function decrease

components/AddToCart/AddToCart.tsx:29–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 };
28
29 const decrease = () => {
30 setAmount((prev) => {
31 let tempAmount = prev - 1;
32 if (tempAmount < 1) {
33 tempAmount = 1;
34 }
35 return tempAmount;
36 });
37 };
38
39 return (
40 <section>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected