Skip to content

Commit

Permalink
Merge pull request #128 from VasylievYurii/AddSuccess
Browse files Browse the repository at this point in the history
caloriesFixed
  • Loading branch information
VasylievYurii authored Nov 19, 2023
2 parents d2fffb7 + fcce65e commit 2d94e90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/AddProductForm/AddProductForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const AddProductForm = ({ id, title, calories, onClick }) => {
const handleSubmit = (values, actions) => {
dispatch(postDiaryMealsThunk(values));
actions.resetForm();
setCalculatedCalories(0);
// setCalculatedCalories(0);
};

const handleCloseClick = () => {
Expand Down
3 changes: 1 addition & 2 deletions src/components/AddProductSuccess/AddProductSuccess.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import {
import avocado from '../../assets/avocado.png';

const AddProductSuccess = ({ closeAllModal, calories }) => {

return (
<ProductForm>
<ImgProduct src={avocado} alt="avocado" loading="lazy"/>
<ImgProduct src={avocado} alt="avocado" loading="lazy" />
<Title>Well done</Title>
<Calories>
Calories: <span>{calories}</span>
Expand Down

0 comments on commit 2d94e90

Please sign in to comment.