Add tag selection also to GraphQL requests pane

This commit is contained in:
Antti Sonkeri
2024-07-28 14:48:41 +03:00
parent 44daba72cd
commit 2bd43011ba
2 changed files with 12 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ import StyledWrapper from './StyledWrapper';
import Documentation from 'components/Documentation/index';
import GraphQLSchemaActions from '../GraphQLSchemaActions/index';
import HeightBoundContainer from 'ui/HeightBoundContainer';
import Tags from 'components/RequestPane/Tags/index';
const GraphQLRequestPane = ({ item, collection, onSchemaLoad, toggleDocs, handleGqlClickReference }) => {
const dispatch = useDispatch();
@@ -101,6 +102,9 @@ const GraphQLRequestPane = ({ item, collection, onSchemaLoad, toggleDocs, handle
case 'docs': {
return <Documentation item={item} collection={collection} />;
}
case 'tags': {
return <Tags item={item} collection={collection} />;
}
default: {
return <div className="mt-4">404 | Not found</div>;
}
@@ -152,6 +156,9 @@ const GraphQLRequestPane = ({ item, collection, onSchemaLoad, toggleDocs, handle
<div className={getTabClassname('docs')} role="tab" onClick={() => selectTab('docs')}>
Docs
</div>
<div className={getTabClassname('tags')} role="tab" onClick={() => selectTab('tags')}>
Tags
</div>
<GraphQLSchemaActions item={item} collection={collection} onSchemaLoad={setSchema} toggleDocs={toggleDocs} />
</div>
<section className="flex w-full mt-5 flex-1 relative">

View File

@@ -33,7 +33,11 @@ const Tags = ({ item, collection }) => {
return null;
}
return <TagList tags={tags} onTagRemove={handleRemove} onTagAdd={handleAdd} />;
return (
<div>
<TagList tags={tags} onTagRemove={handleRemove} onTagAdd={handleAdd} />
</div>
);
};
export default Tags;