import { Formik, Form } from 'formik'
import { Mutation } from 'react-apollo'
import { adopt } from 'react-adopt'
import { useMutation } from '@apollo/react-hooks'
import * as Yup from 'yup'
import { TextInput } from '../../lib/forms'
import TrainingTypeInput from './trainingType'
import { CREATE_TRAINING } from '../../lib/graphql'
const TrainingAdoption = adopt({
mutation: ({ render }) => (
{(createTraining, { loading, data, error }) => render({ createTraining, loading, data, error })}
),
formik: ({ mutation: { createTraining }, render }) => (
console.log(values)}
>
{render}
)
})
const TrainingForm = props => (
{({ mutation: { createTraining, data, loading, error }, formik }) => (
)}
)
export default TrainingForm