File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
src/app/components/StateRoute Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -19,21 +19,15 @@ import LinkControls from './LinkControls';
19
19
import getLinkComponent from './getLinkComponent' ;
20
20
import { toggleExpanded , setCurrentTabInApp } from '../../../actions/actions' ;
21
21
import { useStoreContext } from '../../../store' ;
22
+ import { LinkTypesProps , DefaultMargin , ToolTipStyles } from '../../../components/FrontendTypes'
22
23
23
- const defaultMargin : { } = {
24
+ const defaultMargin : DefaultMargin = {
24
25
top : 30 ,
25
26
left : 30 ,
26
27
right : 55 ,
27
28
bottom : 70 ,
28
29
} ;
29
30
30
- export type LinkTypesProps = {
31
- width : number ;
32
- height : number ;
33
- margin ?: { top : number ; right : number ; bottom : number ; left : number } ;
34
- snapshots : Record < string , unknown > ;
35
- currentSnapshot ?: Record < string , unknown > ;
36
- } ;
37
31
38
32
export default function ComponentMap ( {
39
33
// imported props to be used to display the dendrogram
@@ -95,7 +89,7 @@ export default function ComponentMap({
95
89
scroll : true ,
96
90
} ) ;
97
91
98
- const tooltipStyles : { } = {
92
+ const tooltipStyles : ToolTipStyles = {
99
93
...defaultStyles ,
100
94
minWidth : 60 ,
101
95
maxWidth : 300 ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const StateRoute = (props: StateRouteProps) => {
27
27
const { hierarchy, sliderIndex, viewIndex } = tabs [ currentTab ] ;
28
28
29
29
// Map
30
- const renderComponentMap = ( ) : JSX . Element => {
30
+ const renderComponentMap = ( ) => {
31
31
if ( hierarchy ) {
32
32
return (
33
33
< ParentSize className = 'componentMapContainer' >
@@ -50,7 +50,7 @@ const StateRoute = (props: StateRouteProps) => {
50
50
// if true, we invoke the D3 render chart with hierarchy
51
51
// by invoking History component, and passing in all the props required to render D3 elements and perform timeJump from clicking of node
52
52
// otherwise we send an alert to the user that no state was found.
53
- const renderHistory = ( ) : JSX . Element => {
53
+ const renderHistory : JSX . Element = ( ) => {
54
54
if ( hierarchy ) {
55
55
return (
56
56
< ParentSize >
You can’t perform that action at this time.
0 commit comments