import { FormStore } from 'features/FormStore'

import { useUserInfo } from './hooks'
import { PersonalInfoForm } from '../PersonalInfoForm'

export const PagePersonalInfo = () => {
  const { onSubmit, userInfo } = useUserInfo()
  if (!userInfo) return null
  return (
    <FormStore initialState={userInfo}>
      <PersonalInfoForm onSubmit={onSubmit} />
    </FormStore>
  )
}
