react-google-forms-hooks
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -201,5 +201,4 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
})).then(function (fetchedResult) { | ||
if (!fetchedResult.ok || fetchedResult.status >= 300) { | ||
console.warn('the result of GoogleForm is not correct.', fetchedResult); | ||
} | ||
var wasSuccessful = fetchedResult.ok && fetchedResult.status < 300 && fetchedResult.status >= 200; | ||
return wasSuccessful; | ||
}); | ||
@@ -206,0 +205,0 @@ } catch (e) { |
@@ -199,5 +199,4 @@ import { useForm } from 'react-hook-form'; | ||
})).then(function (fetchedResult) { | ||
if (!fetchedResult.ok || fetchedResult.status >= 300) { | ||
console.warn('the result of GoogleForm is not correct.', fetchedResult); | ||
} | ||
var wasSuccessful = fetchedResult.ok && fetchedResult.status < 300 && fetchedResult.status >= 200; | ||
return wasSuccessful; | ||
}); | ||
@@ -204,0 +203,0 @@ } catch (e) { |
import { GoogleForm } from '../types'; | ||
export declare const GOOGLE_FORMS_URL = "https://docs.google.com/forms/d"; | ||
export declare const formatQuestionName: (id: string) => string; | ||
export declare const submitToGoogleForms: (form: GoogleForm, formData: object) => Promise<void>; | ||
export declare const submitToGoogleForms: (form: GoogleForm, formData: object) => Promise<boolean>; |
@@ -6,3 +6,3 @@ import { UseFormReturn, UseFormRegisterReturn, RegisterOptions, FieldError } from 'react-hook-form'; | ||
getField: GetField; | ||
submitToGoogleForms: (form: FormData) => Promise<void>; | ||
submitToGoogleForms: (form: FormData) => Promise<boolean>; | ||
}; | ||
@@ -9,0 +9,0 @@ export declare type RegisterReturn = { |
{ | ||
"name": "react-google-forms-hooks", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Library to create forms using React backed by Google Forms.", | ||
@@ -5,0 +5,0 @@ "author": "francisconeves97", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
179683
41
1341