Skip to content

Commit

Permalink
Merge pull request #4 from zekraken-bot/develop
Browse files Browse the repository at this point in the history
fix max period issue
  • Loading branch information
zekraken-bot authored Dec 22, 2023
2 parents 3172574 + 0e10814 commit e3b34a2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function App() {
...prevData,
[address]: {
...prevData[address],
[field]: value,
[field]: field === "maxPeriods" ? parseInt(value) : value, // Ensure it's an integer for "maxPeriods"
},
}));
}
Expand Down Expand Up @@ -364,11 +364,7 @@ function App() {
<td>{accountInfo[address]?.isActive.toString() || "Loading..."}</td>
<td>
{isEditMode ? (
<input
type="number"
value={currentData.editableMaxPeriods}
onChange={(e) => updateEditableData(address, "maxPeriods", parseInt(e.target.value) + (accountInfo[address]?.periodNumber || 0))}
/>
<input type="number" value={currentData.editableMaxPeriods} onChange={(e) => updateEditableData(address, "maxPeriods", e.target.value)} />
) : (
currentData.maxPeriods || "Loading..."
)}
Expand Down

0 comments on commit e3b34a2

Please sign in to comment.