mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-24 15:24:17 +00:00
Hide Response tab if there is no response (#1197)
This commit is contained in:
parent
de554f5fb6
commit
4b280ecd6d
@ -32,7 +32,7 @@ export const AutoRepresentation: React.FC<any> = ({ representation, color, opene
|
||||
badge: null
|
||||
}]
|
||||
|
||||
if (response) {
|
||||
if (response && response.length > 0) {
|
||||
arr.push({
|
||||
tab: 'Response',
|
||||
badge: null
|
||||
@ -71,7 +71,7 @@ export const AutoRepresentation: React.FC<any> = ({ representation, color, opene
|
||||
{getOpenedTabIndex() === TabsEnum.Request && <React.Fragment>
|
||||
<SectionsRepresentation data={request} color={color} requestRepresentation={request} />
|
||||
</React.Fragment>}
|
||||
{response && getOpenedTabIndex() === TabsEnum.Response && <React.Fragment>
|
||||
{response && response.length > 0 && getOpenedTabIndex() === TabsEnum.Response && <React.Fragment>
|
||||
<SectionsRepresentation data={response} color={color} />
|
||||
</React.Fragment>}
|
||||
</div>}
|
||||
|
@ -28,10 +28,6 @@ const SectionsRepresentation: React.FC<any> = ({ data, color }) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (sections.length === 0) {
|
||||
sections.push(<div>This request or response has no data.</div>);
|
||||
}
|
||||
|
||||
return <React.Fragment>{sections}</React.Fragment>;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user