mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-24 10:21:15 +01:00
Explicitly set the request layout (#257)
This commit is contained in:
@@ -4,6 +4,7 @@ import { useAtomValue } from 'jotai';
|
||||
import type { CSSProperties } from 'react';
|
||||
import React from 'react';
|
||||
import { useCurrentGraphQLSchema } from '../hooks/useIntrospectGraphQL';
|
||||
import { workspaceLayoutAtom } from '../lib/atoms';
|
||||
import type { SlotProps } from './core/SplitLayout';
|
||||
import { SplitLayout } from './core/SplitLayout';
|
||||
import { GraphQLDocsExplorer } from './graphql/GraphQLDocsExplorer';
|
||||
@@ -16,15 +17,18 @@ interface Props {
|
||||
style: CSSProperties;
|
||||
}
|
||||
|
||||
|
||||
export function HttpRequestLayout({ activeRequest, style }: Props) {
|
||||
const showGraphQLDocExplorer = useAtomValue(showGraphQLDocExplorerAtom);
|
||||
const graphQLSchema = useCurrentGraphQLSchema(activeRequest);
|
||||
const workspaceLayout = useAtomValue(workspaceLayoutAtom);
|
||||
|
||||
const requestResponseSplit = ({ style }: Pick<SlotProps, 'style'>) => (
|
||||
<SplitLayout
|
||||
name="http_layout"
|
||||
className="p-3 gap-1.5"
|
||||
style={style}
|
||||
layout={workspaceLayout}
|
||||
firstSlot={({ orientation, style }) => (
|
||||
<HttpRequestPane
|
||||
style={style}
|
||||
|
||||
Reference in New Issue
Block a user