fix submit button not being disabled

This commit is contained in:
keyan 2023-05-18 13:02:19 -05:00
parent 236dcae13b
commit 87e86526f8
1 changed files with 2 additions and 2 deletions

View File

@ -17,14 +17,14 @@ import { useLazyQuery } from '@apollo/client'
import { USER_SEARCH } from '../fragments/users'
export function SubmitButton ({
children, variant, value, onClick, ...props
children, variant, value, onClick, disabled, ...props
}) {
const { isSubmitting, setFieldValue } = useFormikContext()
return (
<Button
variant={variant || 'main'}
type='submit'
disabled={isSubmitting}
disabled={disabled || isSubmitting}
onClick={value
? e => {
setFieldValue('submit', value)