chore: format changes batch 3

This commit is contained in:
Siddharth Gelera
2025-09-18 16:10:58 +05:30
parent f077d0f861
commit 0ab9c927e7
2 changed files with 35 additions and 25 deletions

View File

@@ -275,24 +275,19 @@ const RequestTabPanel = () => {
: <QueryUrl item={item} collection={collection} handleRun={handleRun} />
}
</div>
<section
ref={mainSectionRef}
className={`main flex ${isVerticalLayout ? 'flex-col' : ''} flex-grow pb-4 relative overflow-auto`}
>
<section ref={mainSectionRef} className={`main flex ${isVerticalLayout ? 'flex-col' : ''} flex-grow pb-4 relative overflow-auto`}>
<section className="request-pane">
<div
className="px-4 h-full"
style={
isVerticalLayout
? {
height: `${Math.max(topPaneHeight, MIN_TOP_PANE_HEIGHT)}px`,
minHeight: `${MIN_TOP_PANE_HEIGHT}px`,
width: '100%'
}
: {
width: `${Math.max(leftPaneWidth, MIN_LEFT_PANE_WIDTH)}px`
}
}
style={isVerticalLayout ? {
height: `${Math.max(topPaneHeight, MIN_TOP_PANE_HEIGHT)}px`,
minHeight: `${MIN_TOP_PANE_HEIGHT}px`,
width: '100%'
} : {
width: `${Math.max(leftPaneWidth, MIN_LEFT_PANE_WIDTH)}px`
}}
>
{item.type === 'graphql-request' ? (
<GraphQLRequestPane
@@ -304,11 +299,15 @@ const RequestTabPanel = () => {
/>
) : null}
{item.type === 'http-request' ? <HttpRequestPane item={item} collection={collection} /> : null}
{item.type === 'http-request' ? (
<HttpRequestPane item={item} collection={collection} />
) : null}
{isGrpcRequest ? (
<GrpcRequestPane item={item} collection={collection} handleRun={handleRun} />
) : isWsRequest ? (
) : null}
{isWsRequest ? (
<WSRequestPane item={item} collection={collection} handleRun={handleRun} />
) : null}
</div>
@@ -320,11 +319,22 @@ const RequestTabPanel = () => {
<section className="response-pane flex-grow overflow-x-auto">
{item.type === 'grpc-request' ? (
<GrpcResponsePane item={item} collection={collection} response={item.response} />
<GrpcResponsePane
item={item}
collection={collection}
response={item.response}
/>
) : item.type === 'ws-request' ? (
<WSResponsePane item={item} collection={collection} response={item.response} />
<WSResponsePane
item={item}
collection={collection}
response={item.response} />
) : (
<ResponsePane item={item} collection={collection} response={item.response} />
<ResponsePane
item={item}
collection={collection}
response={item.response}
/>
)}
</section>
</section>

View File

@@ -336,7 +336,7 @@ const NewRequest = ({ collectionUid, item, isEphemeral, onClose }) => {
Type
</label>
<div className="flex flex-col gap-3">
<div className="mt-2 flex flex-col gap-2">
<div className="flex items-center gap-2">
<input
type="radio"
@@ -347,7 +347,7 @@ const NewRequest = ({ collectionUid, item, isEphemeral, onClose }) => {
onChange={formik.handleChange}
/>
<label htmlFor="http-request" className="ml-1 cursor-pointer select-none">
HTTP Request
HTTP
</label>
</div>
@@ -361,7 +361,7 @@ const NewRequest = ({ collectionUid, item, isEphemeral, onClose }) => {
onChange={formik.handleChange}
/>
<label htmlFor="graphql-request" className="ml-1 cursor-pointer select-none">
GraphQL Request
GraphQL
</label>
</div>
@@ -376,7 +376,7 @@ const NewRequest = ({ collectionUid, item, isEphemeral, onClose }) => {
onChange={formik.handleChange}
/>
<label htmlFor="grpc-request" className="ml-1 cursor-pointer select-none">
gRPC Request
gRPC
</label>
</div>
)}
@@ -392,7 +392,7 @@ const NewRequest = ({ collectionUid, item, isEphemeral, onClose }) => {
onChange={formik.handleChange}
/>
<label htmlFor="ws-request" className="ml-1 cursor-pointer select-none">
WebSocket Request
WebSocket
</label>
</div>
)}