Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaLysiuk committed Jan 17, 2024
1 parent d6bc176 commit 9e2b64a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@ export const ActiveFieldName: React.FC<
onClick?: (n: ParserField) => void;
}
> = ({ args, name, parentTypes, onClick, printPreviewActive }) => {
const handleClickOnParamType = useCallback(
(field: ParserField) => {
if (!onClick) {
return undefined;
}
onClick(field);
},
[onClick]
);

if (args && args.length > 0) {
return (
<Main printPreviewActive={printPreviewActive}>
Expand All @@ -55,7 +45,7 @@ export const ActiveFieldName: React.FC<
<span>{a.name}</span>
:
<ActiveType
onClick={() => handleClickOnParamType(a)}
onClick={onClick ? () => onClick(a) : undefined}
type={a.type}
parentTypes={parentTypes}
/>
Expand Down
6 changes: 3 additions & 3 deletions packages/editor/src/state/containers/trees/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ const useTreesStateContainer = createContainer(() => {
.map((a) => a.name);
const nodesRelatedToActiveInterface =
activeNode &&
activeNode.data.type === TypeDefinition.InterfaceTypeDefinition
activeNode.data.type === TypeDefinition.InterfaceTypeDefinition
? allNodes.nodes
.filter((node) => node.interfaces.includes(activeNode.name))
.map((a) => a.name)
.filter((node) => node.interfaces.includes(activeNode.name))
.map((a) => a.name)
: [];
const notBaseTypes = activeNode?.args
.map((a) => getTypeName(a.type.fieldType))
Expand Down

0 comments on commit 9e2b64a

Please sign in to comment.