Skip to content

Commit

Permalink
refactor: minor nits
Browse files Browse the repository at this point in the history
  • Loading branch information
PintoGideon committed Apr 26, 2024
1 parent f05db18 commit 9202dca
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/PipelinesCopy/Tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,23 @@ const Tree = (props: TreeProps) => {
y: 0,
});
const size = useSize(divRef);
//const graphSize = useSize(graphRef);
const [loading, setLoading] = React.useState(false);
const [data, setData] = React.useState<TreeNode[]>();
const [tsIds, setTsIds] = React.useState<any>();
const [tsIds, setTsIds] = React.useState<{
[key: string]: number[];
}>();
const { zoom, scaleExtent } = props;

const bindZoomListener = React.useCallback(() => {
const svg = select(`.${svgClassName}`);
const g = select(`.${graphClassName}`);

svg.call(
///@ts-ignore
//@ts-ignore
d3Zoom().transform,
///@ts-ignore
zoomIdentity
.translate(translate.x, translate.y)
//@ts-ignore
.scale(zoom),
);

Expand Down Expand Up @@ -238,7 +239,7 @@ const Tree = (props: TreeProps) => {
{nodes?.map(({ data, x, y, parent }, i) => {
return (
<NodeData
key={`node + ${i}`}
key={`node_${i}`}
data={data}
position={{ x, y }}
parent={parent}
Expand Down

0 comments on commit 9202dca

Please sign in to comment.