import React, {PropTypes, Component} from 'react' import {Tab, Tabs, TabList, TabPanel} from 'react-tabs' import StatusTag from './StatusTag' import SizeTag from './SizeTag' import TimeTag from './TimeTag' import PreviewModeDropdown from '../components/PreviewModeDropdown' import ResponseViewer from '../components/ResponseViewer' import {getPreviewModeName} from '../lib/previewModes' import {PREVIEW_MODE_SOURCE} from "../lib/previewModes"; class ResponsePane extends Component { render () { const {response, previewMode, updatePreviewMode} = this.props; if (!response) { return (

Nothing Yet...

Click the Send button to trigger a request

) } return (
{!response ? null : (
)}
{response.error ? ( ) : ( )} {response.headers.map((h, i) => ( ))}
Name Value
{h.name} {h.value}
) } } ResponsePane.propTypes = { // Functions updatePreviewMode: PropTypes.func.isRequired, // Required previewMode: PropTypes.string.isRequired, // Other response: PropTypes.object }; export default ResponsePane;