import React, { useMemo } from 'react'; import PropTypes from 'prop-types'; import { CButton, CRow, CCol } from '@coreui/react'; import CIcon from '@coreui/icons-react'; import { cilArrowLeft } from '@coreui/icons'; const IeDisplay = ({ ies, setIes }) => { const handleClick = () => { setIes(undefined); }; const display = useMemo( () => ies.map((ie) => { if (ie.byteArr) { return (
{ie.name}:{' '}
                {ie.byteArr.map((arr, i) => {
                  const offset = (i * 8).toString(16);
                  return (
                    
                      {offset.length === 1 ? `0${offset}` : offset}: {arr.join('  ')}
                    
); })}
); } return (
{ie.name}:{' '}
              {JSON.stringify(ie.data, null, 4)}
            
); }), [ies], ); return ( <>

Information Elements

Go Back
{display} ); }; IeDisplay.propTypes = { ies: PropTypes.instanceOf(Array).isRequired, setIes: PropTypes.func.isRequired, }; export default IeDisplay;