Skip to content

Commit b20577b

Browse files
yuanjackie1MarkTeetsjasnoominzo-kim
committed
full TS on tree.tsx and getLinkComponent.tsx
Co-authored-by: Mark Teets <[email protected]> Co-authored-by: Jasmine Noor <[email protected]> Co-authored-by: Minzo Kim <[email protected]> Co-authored-by: Jackie Yuan <[email protected]>
1 parent 9cec304 commit b20577b

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

src/app/components/StateRoute/ComponentMap/getLinkComponent.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ import {
1212
LinkVerticalLine,
1313
LinkRadialLine,
1414
} from '@visx/shape';
15+
import { LinkComponent } from '../../../components/FrontendTypes'
1516

1617
export default function getLinkComponent({
1718
layout,
1819
linkType,
1920
orientation,
20-
}: {
21-
layout: string;
22-
linkType: string;
23-
orientation: string;
24-
}): React.ComponentType<unknown> {
21+
}: LinkComponent): React.ComponentType<unknown> {
2522
let LinkComponent: React.ComponentType<unknown>;
2623

2724
if (layout === 'polar') {

src/app/components/StateRoute/Tree.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import JSONTree from 'react-json-tree';
33

44
import { setCurrentTabInApp } from '../../actions/actions';
55
import { useStoreContext } from '../../store';
6+
import { TreeProps } from '../../components/FrontendTypes'
67

78
const colors = {
89
scheme: 'paraiso',
@@ -32,15 +33,6 @@ const getItemString = (type, data: { state?: object | string; name: string; chil
3233
return <span />;
3334
};
3435

35-
interface TreeProps {
36-
snapshot: {
37-
name?: string;
38-
componentData?: object;
39-
state?: string | object;
40-
stateSnaphot?: object;
41-
children?: any[];
42-
};
43-
}
4436

4537
const Tree = (props: TreeProps) => {
4638
const { snapshot } = props;

0 commit comments

Comments
 (0)