Add Proto to request detail, update theme

This commit is contained in:
David Stotijn
2020-09-21 22:27:10 +02:00
parent fe1ddabda3
commit 7defc19d1a
9 changed files with 75 additions and 13 deletions

View File

@ -10,6 +10,7 @@ const HTTP_REQUEST_LOG = gql`
id
method
url
proto
body
response {
proto
@ -30,17 +31,17 @@ function LogDetail({ requestId: id }: Props): JSX.Element {
variables: { id },
});
if (loading) return "Loading...";
if (error) return `Error: ${error.message}`;
if (loading) return <div>"Loading..."</div>;
if (error) return <div>`Error: ${error.message}`</div>;
const { method, url, body, response } = data.httpRequestLog;
const { method, url, proto, body, response } = data.httpRequestLog;
return (
<div>
<Grid container item spacing={2}>
<Grid item xs={6}>
<Box component={Paper} maxHeight="60vh" overflow="scroll">
<RequestDetail request={{ method, url, body }} />
<RequestDetail request={{ method, url, proto, body }} />
</Box>
</Grid>
<Grid item xs={6}>