'use client' import React from 'react' import { Icon } from "@/components/ui/icon"; import { Button } from "@/components/ui/button"; import { useTranslations } from "next-intl"; const CounterButton = () => { const t = useTranslations("EcommerceApp"); const [count, setCount] = React.useState(1) const [show, setShow] = React.useState(false) const handleIncreaseQuantity = () => { if (count < 10) { setCount(count + 1) } } const handleDecreaseQuantity = () => { if (count > 0) { setCount(count - 1) } } return ( <> {!show && ( )} {show && (
{count}
)} ); }; export default CounterButton;