Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit 398d63c

Browse files
Fix upload to Netlify
1 parent 66bd2d1 commit 398d63c

File tree

1 file changed

+5
-5
lines changed
  • packages/builder/src/components/Modal/components/ExportNetlify

1 file changed

+5
-5
lines changed

packages/builder/src/components/Modal/components/ExportNetlify/widget.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React, { Component, createRef, forwardRef } from 'react'
22
import { ReactReduxContext } from 'react-redux'
3+
import { findDOMNode } from 'react-dom'
34

4-
import { Formik, Field } from 'formik'
5+
import { Formik, Field, Form } from 'formik'
56
import { Input } from '../../../Form'
67

78
import { FormGroup, Label, FormText,
@@ -21,12 +22,11 @@ const validateApiKey = value => {
2122

2223
const NetlifyForm = forwardRef(({ onSubmit }, ref) =>
2324
<Formik
24-
ref={ ref }
2525
initialValues={{ site: '', apiKey: '' }}
2626
onSubmit={ onSubmit }
2727
>
2828
{({ errors, touched }) => (
29-
<>
29+
<Form ref={ ref }>
3030
<FormGroup>
3131
<Label for="site">
3232
Study domain/site{' '}
@@ -56,7 +56,7 @@ const NetlifyForm = forwardRef(({ onSubmit }, ref) =>
5656
You'll need to <a href="https://app.netlify.com/account/applications" target="_blank" rel="noopener noreferrer">create an API token</a> or enter an existing one. We don't save or share this information, so make sure to jot it down!
5757
</FormText>
5858
</FormGroup>
59-
</>
59+
</Form>
6060
)}
6161
</Formik>
6262
)
@@ -73,7 +73,7 @@ class NetlifyWidget extends Component {
7373
}
7474

7575
triggerSubmit() {
76-
this.formRef.current.submitForm()
76+
findDOMNode(this.formRef.current).requestSubmit()
7777
}
7878

7979
async send(data) {

0 commit comments

Comments
 (0)