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