import { useQuery, useMutation } from "react-apollo" import { useFormHandler, TextInput } from "../form/forms" import { CURRENT_USER, USER_EDIT } from "./graphql" import { SyntheticEvent } from "react" const initialData = { name: '', email: '', password: '', passwordAgain: '' } const UserEditForm = () => { const currentUser = useQuery(CURRENT_USER) const [updateUser, userEdit] = useMutation(USER_EDIT) const { inputProps } = useFormHandler(currentUser.data ? { ...initialData, ...currentUser.data.me } : initialData) return (
) } export default UserEditForm