mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-22 20:25:38 +00:00
feat: simplify query URL rendering
This commit is contained in:
@@ -258,6 +258,16 @@ const RequestTabPanel = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const QueryUrlOutlet = () => {
|
||||
if (isGrpcRequest) {
|
||||
return <GrpcQueryUrl item={item} collection={collection} handleRun={handleRun} />;
|
||||
}
|
||||
if (isWsRequest) {
|
||||
return <WsQueryUrl item={item} collection={collection} handleRun={handleRun} />;
|
||||
}
|
||||
return <QueryUrl item={item} collection={collection} handleRun={handleRun} />;
|
||||
}
|
||||
|
||||
// TODO: reaper, improve selection of panes
|
||||
return (
|
||||
<StyledWrapper
|
||||
@@ -266,13 +276,7 @@ const RequestTabPanel = () => {
|
||||
}`}
|
||||
>
|
||||
<div className="pt-4 pb-3 px-4">
|
||||
{isGrpcRequest ? (
|
||||
<GrpcQueryUrl item={item} collection={collection} handleRun={handleRun} />
|
||||
) : isWsRequest ? (
|
||||
<WsQueryUrl item={item} collection={collection} handleRun={handleRun} />
|
||||
) : (
|
||||
<QueryUrl item={item} collection={collection} handleRun={handleRun} />
|
||||
)}
|
||||
<QueryUrlOutlet />
|
||||
</div>
|
||||
<section
|
||||
ref={mainSectionRef}
|
||||
|
||||
Reference in New Issue
Block a user