Skip to content

Commit

Permalink
fix(form-provider): export const
Browse files Browse the repository at this point in the history
  • Loading branch information
absolemDev committed Nov 24, 2023
1 parent e122833 commit 9ac4775
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions packages/payment-widget/src/ui/form/form.provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { FormProviderProps } from '../../interfaces'
import { Provider } from './form.context'
import { useValidate } from '../../hooks'

const FormProvider: FC<FormProviderProps> = ({ disabled, children }) => {
export const FormProvider: FC<FormProviderProps> = ({ disabled, children }) => {
const { errors, validateField, isValidate } = useValidate()
const value = useMemo(
() => ({ errors, validateField, isValidate, disabled }),
Expand All @@ -15,5 +15,3 @@ const FormProvider: FC<FormProviderProps> = ({ disabled, children }) => {

return <Provider value={value}>{children}</Provider>
}

export default FormProvider
2 changes: 1 addition & 1 deletion packages/payment-widget/src/ui/widget.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { FC } from 'react'
import { IntlProvider } from 'react-intl'
import { isValidElement } from 'react'

import FormProvider from './form/form.provider'
import { LanguagesType } from '../enums'
import { WidgetProps } from '../interfaces'
import { Form } from './form'
import { FormProvider } from './form/form.provider'
import { ThemeProvider } from './theme/src'

const messages = {
Expand Down

0 comments on commit 9ac4775

Please sign in to comment.