18 lines
522 B
TypeScript
18 lines
522 B
TypeScript
import ActionsButtons from "components/ActionsButtons/ActionsButtons";
|
|
import { selectCart, setTmp } from "features/order/orderSlice";
|
|
import { useAppDispatch, useAppSelector } from "redux/hooks";
|
|
|
|
export default function TotalPeopleActions() {
|
|
const dispatch = useAppDispatch();
|
|
const { tmp } = useAppSelector(selectCart);
|
|
|
|
return (
|
|
<ActionsButtons
|
|
quantity={tmp?.totalPeople || 2}
|
|
setQuantity={(value) => dispatch(setTmp({ ...tmp, totalPeople: value }))}
|
|
max={10}
|
|
min={2}
|
|
/>
|
|
);
|
|
}
|