@@ -14,33 +14,20 @@ import { changeView, changeSlider } from '../../actions/actions';
14
14
import { useStoreContext } from '../../store' ;
15
15
import PerformanceVisx from './PerformanceVisx/PerformanceVisx' ;
16
16
import WebMetrics from '../WebMetrics' ;
17
+ import { StateRouteProps } from '../../components/FrontendTypes'
17
18
18
19
const History = require ( './History' ) . default ;
19
20
20
21
const NO_STATE_MSG = 'No state change detected. Trigger an event to change state' ;
21
22
22
- export interface StateRouteProps {
23
- snapshot : {
24
- name ?: string ;
25
- componentData ?: object ;
26
- state ?: string | object ;
27
- stateSnaphot ?: object ;
28
- children ?: any [ ] ;
29
- } ;
30
- hierarchy : any ;
31
- snapshots : [ ] ;
32
- viewIndex : number ;
33
- webMetrics : object ;
34
- currLocation : object ;
35
- }
36
23
37
24
const StateRoute = ( props : StateRouteProps ) => {
38
25
const { snapshot, hierarchy, snapshots, viewIndex, webMetrics, currLocation } = props ;
39
26
const [ { tabs, currentTab } , dispatch ] = useStoreContext ( ) ;
40
27
const { hierarchy, sliderIndex, viewIndex } = tabs [ currentTab ] ;
41
28
42
29
// Map
43
- const renderComponentMap = ( ) => {
30
+ const renderComponentMap = ( ) : JSX . Element => {
44
31
if ( hierarchy ) {
45
32
return (
46
33
< ParentSize className = 'componentMapContainer' >
@@ -63,7 +50,7 @@ const StateRoute = (props: StateRouteProps) => {
63
50
// if true, we invoke the D3 render chart with hierarchy
64
51
// by invoking History component, and passing in all the props required to render D3 elements and perform timeJump from clicking of node
65
52
// otherwise we send an alert to the user that no state was found.
66
- const renderHistory = ( ) => {
53
+ const renderHistory = ( ) : JSX . Element => {
67
54
if ( hierarchy ) {
68
55
return (
69
56
< ParentSize >
0 commit comments