import React, { useState } from 'react'; import TextField from '@material-ui/core/TextField'; import t from './common/localization'; import EditItemView from './EditItemView'; const UserPage = () => { const [item, setItem] = useState(); const [name, setName] = useState(''); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const getItem = () => { const updatedItem = item; updatedItem.name = name; updatedItem.email = email; updatedItem.password = password; return updatedItem; }; return ( {item && <> setName(event.target.value)} label={t('sharedName')} variant="filled" /> setEmail(event.target.value)} label={t('userEmail')} variant="filled" /> setPassword(event.target.value)} label={t('userPassword')} variant="filled" /> } ); } export default UserPage;