import React from 'react'; import { Page } from '../Page'; import { UserForm } from '../UserForm'; import { User } from '../../types/user'; import { useUserProfile } from '../../gql/queries/profile'; import { useUpdateUserProfileMutation } from '../../gql/mutations/profile'; export function ProfilePage() { const { user, loading } = useUserProfile(); const [ updateProfile, updateUserProfileMutation ] = useUpdateUserProfileMutation(); const isLoading = updateUserProfileMutation.loading || loading; const onUserChange = (user: User) => { if (user.name !== user.name) { updateProfile({ variables: {changes: { name: user.name }}}); } }; return (

Mon profil

{ !isLoading ? : null }
); } export default ProfilePage;