Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
KostyaCholak committed Jul 8, 2024
1 parent f8c0918 commit c4b986d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/canvas/DictWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getStructureFromSource, RefSource, Representation, Source } from "@/sources";
import { getStructureFromSource, Representation, Source } from "@/sources";
import getSize, { type Size } from "@/structures/size";
import { BaseStructure, DictStructure } from "@/structures/types";
import React, { useMemo } from "react";
Expand Down
2 changes: 1 addition & 1 deletion src/components/canvas/ListWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function ListCanvasComponent(props: WidgetProps) {
"data": source.map(source => getStructureFromSource(props.structure, source)),
}
} else {
structure = getStructureFromSource(props.structure, source as RefSource) as ListStructure;
structure = getStructureFromSource(props.structure, source) as ListStructure;
}

const size = getSize(props.structure, representation);
Expand Down
1 change: 0 additions & 1 deletion src/components/canvas/NumberWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { getStructureFromSource, Representation, Source } from "@/sources";
import getByPath from "@/structures/path_ref";
import getSize, { Size } from "@/structures/size";
import { Rect, Text } from "react-konva";
import { Widget } from "../registry";
Expand Down
3 changes: 1 addition & 2 deletions src/components/canvas/VListWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getStructureFromSource, RefSource, Representation, Source } from "@/sources";
import { getStructureFromSource, Representation, Source } from "@/sources";
import getSize, { type Size } from "@/structures/size";
import { BaseStructure, ListStructure } from "@/structures/types";
import { Group, Rect } from "react-konva";
Expand Down Expand Up @@ -106,7 +106,6 @@ function ListCanvasComponent(props: WidgetProps) {
"data": source.map(source => getStructureFromSource(props.structure, source)),
}
} else {
const source = source as RefSource;
structure = getStructureFromSource(props.structure, source) as ListStructure;
}

Expand Down

0 comments on commit c4b986d

Please sign in to comment.