Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: leave as string to avoid as number #1471

Merged
merged 2 commits into from Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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