This repository was archived by the owner on Feb 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +1
-13
lines changed
components/molecules/GravityForm Expand file tree Collapse file tree 3 files changed +1
-13
lines changed Original file line number Diff line number Diff line change 1
1
import PropTypes from 'prop-types'
2
2
import * as GfFields from '.'
3
3
4
- // import {Field} from 'formik'
5
- // import InputError from '@/components/atoms/Inputs/InputError'
6
-
7
4
/**
8
5
* Render the Fields component.
9
6
*
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export default function File({
45
45
required = { isRequired }
46
46
type = "file"
47
47
onChange = { ( e ) => {
48
- // Save to _filedata here so we don't corrupt state
48
+ // Save to _filedata here so we don't corrupt state.
49
49
setFieldValue ( `${ fieldId } _filedata` , e . currentTarget . files [ 0 ] )
50
50
} }
51
51
/>
Original file line number Diff line number Diff line change @@ -25,12 +25,6 @@ export default function GravityForm({
25
25
const formValidationSchema = getGfFormValidationSchema ( fieldData )
26
26
const fieldDefaults = getGfFormDefaults ( fieldData )
27
27
28
- // fetch('/api/wp/getWPUrl')
29
- // .then((result) => result.json)
30
- // .then((parsed) => {
31
- // wpBase = parsed.wpApiUrlBase
32
- // })
33
-
34
28
return (
35
29
< Form
36
30
className = { cn ( styles . gravityForm , cssClass ) }
@@ -64,7 +58,6 @@ export default function GravityForm({
64
58
formData . append ( `${ fieldName } _${ index + 1 } ` , arrayFieldValue )
65
59
} )
66
60
} else {
67
- //if (values[key] instanceof File) {
68
61
formData . append ( fieldName , values [ key ] )
69
62
}
70
63
break
@@ -79,8 +72,6 @@ export default function GravityForm({
79
72
mimeType : 'multipart/form-data' ,
80
73
body : formData
81
74
} ) . then ( ( response ) => response . json ( ) )
82
- // .then(data => console.log(data))
83
- // .catch(error => console.log({error}))
84
75
} }
85
76
>
86
77
{ ( formikProps ) => (
You can’t perform that action at this time.
0 commit comments