import React, {PropTypes} from 'react' import {Tab, Tabs, TabList, TabPanel} from 'react-tabs' import StatusTag from '../components/StatusTag' import SizeTag from '../components/SizeTag' import TimeTag from '../components/TimeTag' import PreviewModeDropdown from '../components/PreviewModeDropdown' import ResponseViewer from '../components/ResponseViewer' import {getPreviewModeName} from '../lib/previewModes' const ResponsePane = ({response, previewMode, updatePreviewMode}) => { if (!response) { return ( Nothing Yet... Click the Send button to trigger a request ) } return ( {!response ? null : ( )} {getPreviewModeName(previewMode)} Headers {response.headers.map((h, i) => ( {h.name} {h.value} ))} ) }; ResponsePane.propTypes = { // Functions updatePreviewMode: PropTypes.func.isRequired, // Required previewMode: PropTypes.string.isRequired, // Other response: PropTypes.object }; export default ResponsePane;
Click the Send button to trigger a request