Mix default and custom tips during sort
This commit is contained in:
parent
c05a76d664
commit
0effc065c6
|
@ -8,8 +8,8 @@ import { amountSchema } from '../lib/validate'
|
||||||
const defaultTips = [100, 1000, 10000, 100000]
|
const defaultTips = [100, 1000, 10000, 100000]
|
||||||
|
|
||||||
const Tips = ({ setOValue }) => {
|
const Tips = ({ setOValue }) => {
|
||||||
const customTips = getCustomTips().sort((a, b) => a - b)
|
const tips = [...getCustomTips(), ...defaultTips].sort((a, b) => a - b)
|
||||||
return [...customTips, ...defaultTips].map(num =>
|
return tips.map(num =>
|
||||||
<Button
|
<Button
|
||||||
size='sm'
|
size='sm'
|
||||||
className={`${num > 1 ? 'ml-2' : ''} mb-2`}
|
className={`${num > 1 ? 'ml-2' : ''} mb-2`}
|
||||||
|
|
Loading…
Reference in New Issue