improve err message on boost

This commit is contained in:
keyan 2022-04-25 12:07:31 -05:00
parent b68fadc63d
commit 18a15b4e60
1 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ import { NAME_QUERY } from '../fragments/users'
export function AdvPostSchema (client) {
return {
boost: Yup.number().typeError('must be a number')
.min(BOOST_MIN, `must be at least ${BOOST_MIN}`).integer('must be whole'),
.min(BOOST_MIN, `must be blank or at least ${BOOST_MIN}`).integer('must be whole'),
forward: Yup.string()
.test({
name: 'name',
@ -34,13 +34,13 @@ export default function AdvPostForm () {
body={
<>
<Input
label={<>boost <small className='text-muted ml-2'>optional</small></>}
label={<>boost</>}
name='boost'
hint={<span className='text-muted'>ranks posts higher temporarily based on the amount</span>}
append={<InputGroup.Text className='text-monospace'>sats</InputGroup.Text>}
/>
<Input
label={<>forward sats to <small className='text-muted ml-2'>optional</small></>}
label={<>forward sats to</>}
name='forward'
hint={<span className='text-muted'>100% of sats will be sent to this user</span>}
prepend=<InputGroup.Text>@</InputGroup.Text>