Skip to content

Commit

Permalink
closes #832
Browse files Browse the repository at this point in the history
  • Loading branch information
sofiaromorales committed Jun 21, 2023
1 parent 224ece7 commit 874635d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
11 changes: 0 additions & 11 deletions srcv2/components/AdvancedWalletSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,6 @@ const AdvancedWalletSetup = () => {
}
}

const handleInputChange = (value, setValue, regex) => {
if (regex) {
if (regex.test(value)) {
setValue(value)
}
} else {
setValue(value)
}
}

const renderAdvancedWalletInputs = () => {
return inputOptions.map(r => {
return (
Expand All @@ -123,7 +113,6 @@ const AdvancedWalletSetup = () => {
type='text'
placeholder={r.label}
value={r.value}
onChange={(e) => handleInputChange(e.target.value, r.setValue, r.regex)}
className='
mt-5
form-control
Expand Down
10 changes: 7 additions & 3 deletions srcv2/components/SendBonus.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ const SendBonus = (props) => {
setScreenIndex(screenIndex + 1)
}

const disableContinue = (!selectedContributors.length || !bonusAmount) && bonusPayments.length == 0
const enableContinue = (
selectedContributors.length && bonusAmount != 0 && selectedBonusSplitType == 0
) || (
!bonusPayments.length == 0 && selectedBonusSplitType == 1
)

if (screenIndex == 3) {
setOpen(false)
Expand Down Expand Up @@ -117,10 +121,10 @@ const SendBonus = (props) => {
}
<div className='grid absolute bottom-10 left-16 right-16 gap-2'>
<button
className={`${disableContinue ? 'bg-med-gray' : 'bg-setlife'} rounded-full py-2 w-full text-white`}
className={`${!enableContinue ? 'bg-med-gray' : 'bg-setlife'} rounded-full py-2 w-full text-white`}
onClick={() => nextStep()}
type='button'
disabled={disableContinue}
disabled={!enableContinue}
>
{`${buttonText[screenIndex]}`}
</button>
Expand Down

0 comments on commit 874635d

Please sign in to comment.