Skip to content

Commit

Permalink
Merge pull request #11 from idna001/feature-bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
idna001 authored Jan 30, 2024
2 parents 02bdca2 + f352e60 commit 599574d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const App = () => {
}, []);

const handleFormSubmit = (number1, number2) => {
const sum = parseFloat(number1) + parseFloat(number2);
let sum = parseFloat(number1) + parseFloat(number2);
if (sum > 36) {
sum = Math.floor(Math.random() * 37);
}
const newEntry = { number1, number2, sum };

setHistory([newEntry, ...history]);
Expand Down

0 comments on commit 599574d

Please sign in to comment.