mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
lint code
This commit is contained in:
parent
920fd2a472
commit
51ba940aa3
@ -19,34 +19,33 @@ const baseLabelStyle = {
|
||||
};
|
||||
|
||||
export const CustomNode = (nodeProps: NodeProps) => {
|
||||
const { properties: data } = nodeProps;
|
||||
const { properties } = nodeProps;
|
||||
|
||||
return (
|
||||
<Node {...nodeProps} label={<Label style={baseLabelStyle} />}>
|
||||
{() => {
|
||||
const { width, height } = nodeProps;
|
||||
{({ width, height, x, y }) => {
|
||||
if (properties.text instanceof Object) {
|
||||
const entries = Object.entries<string>(properties.text);
|
||||
|
||||
if (data.text instanceof Object) {
|
||||
const entries = Object.entries<string>(data.text);
|
||||
return (
|
||||
<ObjectNode
|
||||
x={nodeProps.x}
|
||||
y={nodeProps.y}
|
||||
value={entries}
|
||||
width={width}
|
||||
height={height}
|
||||
value={entries}
|
||||
x={x}
|
||||
y={y}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<TextNode
|
||||
isParent={data.data.isParent}
|
||||
isParent={properties.data.isParent}
|
||||
value={properties.text}
|
||||
width={width}
|
||||
height={height}
|
||||
value={data.text}
|
||||
x={nodeProps.x}
|
||||
y={nodeProps.y}
|
||||
x={x}
|
||||
y={y}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user