Skip to content

Commit

Permalink
feat: leave as string to avoid as number
Browse files Browse the repository at this point in the history
  • Loading branch information
jbranchaud committed Mar 26, 2024
1 parent 1615382 commit 3f5a192
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Expand Up @@ -10,7 +10,7 @@ export type SubscribeFormProps = {
submitButtonElem?: React.ReactElement
onError?: (error?: any) => void
onSuccess?: (subscriber?: ConvertkitSubscriber, email?: string) => void
formId?: number
formId?: string
subscribeApiURL?: string
id?: string
fields?: Record<string, string>
Expand Down
4 changes: 2 additions & 2 deletions packages/convertkit-react-ui/src/hooks/use-convertkit-form.ts
Expand Up @@ -12,13 +12,13 @@ import {
**/
export function useConvertkitForm({
submitUrl = CONVERTKIT_SUBSCRIBE_API_URL,
formId = (CONVERTKIT_SIGNUP_FORM || 0) as number,
formId = CONVERTKIT_SIGNUP_FORM || '0',
fields,
onSuccess,
onError,
}: {
submitUrl?: string
formId?: number
formId?: string
onSuccess: (subscriber: ConvertkitSubscriber, email?: string) => void
onError: (error?: any) => void
fields?: any
Expand Down
Expand Up @@ -14,7 +14,7 @@ export type SubscribeFormProps = {
submitButtonElem?: React.ReactElement
onError?: (error?: any) => void
onSuccess?: (subscriber?: Subscriber, email?: string) => void
formId?: number
formId?: string
subscribeApiURL?: string
id?: string
fields?: Record<string, string>
Expand Down
4 changes: 2 additions & 2 deletions packages/skill-lesson/hooks/use-convertkit-form.ts
Expand Up @@ -9,15 +9,15 @@ import {

export function useConvertkitForm({
submitUrl = CONVERTKIT_SUBSCRIBE_API_URL,
formId = (CONVERTKIT_SIGNUP_FORM || 0) as number,
formId = CONVERTKIT_SIGNUP_FORM || '0',
fields,
onSuccess,
onError,
validationSchema,
validateOnChange = false,
}: {
submitUrl?: string
formId?: number
formId?: string
onSuccess: (subscriber: Subscriber, email?: string) => void
onError: (error?: any) => void
fields?: any
Expand Down

0 comments on commit 3f5a192

Please sign in to comment.