Fix key warnings

Summary: Fixed a bunch of key errors in the network plugin, when a plugin is selected

Reviewed By: passy

Differential Revision: D19980275

fbshipit-source-id: 0ae61ed3b655c03d11c848d3502f455a409dcdcf
This commit is contained in:
Michel Weststrate
2020-02-20 04:37:53 -08:00
committed by Facebook Github Bot
parent 2dad8809c4
commit ea1c21c8c3

View File

@@ -132,7 +132,11 @@ export default class RequestDetails extends Component<
return ( return (
<RequestDetails.Container> <RequestDetails.Container>
<Panel heading={'Request'} floating={false} padded={false}> <Panel
key="request"
heading={'Request'}
floating={false}
padded={false}>
<ManagedTable <ManagedTable
multiline={true} multiline={true}
columnSizes={KeyValueColumnSizes} columnSizes={KeyValueColumnSizes}
@@ -154,13 +158,18 @@ export default class RequestDetails extends Component<
) : null} ) : null}
{request.headers.length > 0 ? ( {request.headers.length > 0 ? (
<Panel heading={'Request Headers'} floating={false} padded={false}> <Panel
key="headers"
heading={'Request Headers'}
floating={false}
padded={false}>
<HeaderInspector headers={request.headers} /> <HeaderInspector headers={request.headers} />
</Panel> </Panel>
) : null} ) : null}
{request.data != null ? ( {request.data != null ? (
<Panel <Panel
key="requestData"
heading={'Request Body'} heading={'Request Body'}
floating={false} floating={false}
padded={!formattedText}> padded={!formattedText}>
@@ -170,29 +179,35 @@ export default class RequestDetails extends Component<
/> />
</Panel> </Panel>
) : null} ) : null}
{response {response ? (
? [ <>
response.headers.length > 0 ? ( {response.headers.length > 0 ? (
<Panel
heading={'Response Headers'}
floating={false}
padded={false}>
<HeaderInspector headers={response.headers} />
</Panel>
) : null,
<Panel <Panel
heading={'Response Body'} key={'responseheaders'}
heading={'Response Headers'}
floating={false} floating={false}
padded={!formattedText}> padded={false}>
<ResponseBodyInspector <HeaderInspector headers={response.headers} />
formattedText={formattedText} </Panel>
request={request} ) : null}
response={response} <Panel
/> key={'responsebody'}
</Panel>, heading={'Response Body'}
] floating={false}
: null} padded={!formattedText}>
<Panel heading={'Options'} floating={false} collapsed={true}> <ResponseBodyInspector
formattedText={formattedText}
request={request}
response={response}
/>
</Panel>
</>
) : null}
<Panel
key="options"
heading={'Options'}
floating={false}
collapsed={true}>
<Select <Select
grow grow
label="Body" label="Body"
@@ -202,7 +217,11 @@ export default class RequestDetails extends Component<
/> />
</Panel> </Panel>
{response && response.insights ? ( {response && response.insights ? (
<Panel heading={'Insights'} floating={false} collapsed={true}> <Panel
key="insights"
heading={'Insights'}
floating={false}
collapsed={true}>
<InsightsInspector insights={response.insights} /> <InsightsInspector insights={response.insights} />
</Panel> </Panel>
) : null} ) : null}