11import React , { useState } from 'react' ;
2- import { FetchForm , FetchFormsProvider } from '@fetchforms/react' ;
2+ import { FetchForm } from '@fetchforms/react' ;
33
44const ManagedForm = ( ) => {
55 const [ formSubmission , setFormSubmission ] = useState ( null ) ;
@@ -11,29 +11,24 @@ const ManagedForm = () => {
1111 } ;
1212 return (
1313 < div className = '' >
14- < FetchFormsProvider permission = { process . env . REACT_APP_FF_TOKEN } >
15- < div className = 'text-3xl mb-2' > Managed Form</ div >
16- < p className = 'text-gray-600' >
17- The easiest way to use Fetch Forms. Pass in a form slug and we'll
18- handle client-side validation, input formatting, submissions, and
19- styling.
20- < br />
21- When submitted, the data will be passed to your component after it's
22- formatted and saved to the Fetch Forms cloud (only if cloudSave is
23- enabled).
24- </ p >
14+ < div className = 'text-3xl mb-2' > Managed Form</ div >
15+ < p className = 'text-gray-600' >
16+ The easiest way to use Fetch Forms. Pass in a form slug and we'll handle
17+ client-side validation, input formatting, submissions, and styling.
2518 < br />
26- < div >
27- < FetchForm
28- slug = { process . env . REACT_APP_FF_FORM_ID }
29- onSubmit = { onSubmit }
30- />
31- < br />
32- { formSubmission && (
33- < pre > { JSON . stringify ( formSubmission , null , 2 ) } </ pre >
34- ) }
35- </ div >
36- </ FetchFormsProvider >
19+ When submitted, the data will be passed to your component after it's
20+ formatted and saved to the Fetch Forms cloud (only if cloudSave is
21+ enabled).
22+ </ p >
23+ < br />
24+ < div >
25+ < FetchForm
26+ slug = { process . env . REACT_APP_FF_FORM_ID }
27+ onSubmit = { onSubmit }
28+ />
29+ < br />
30+ { formSubmission && < pre > { JSON . stringify ( formSubmission , null , 2 ) } </ pre > }
31+ </ div >
3732 </ div >
3833 ) ;
3934} ;
0 commit comments