Skip to content
Snippets Groups Projects
Unverified Commit 7905e0ee authored by Kyle Doherty's avatar Kyle Doherty
Browse files

fix flow

parent 5ef3ecfe
No related branches found
No related tags found
No related merge requests found
/* @flow */
import type {
ClickAction,
ClickActionProps
......
/* @flow */
import React, { Component } from 'react'
import { connect } from 'react-redux'
......
......@@ -27,8 +27,24 @@ import { Heading, XRayPageWrapper } from 'metabase/xray/components/XRayLayout'
type Props = {
fetchFieldFingerPrint: () => void,
fingerprint: {},
params: {},
fingerprint: {
table: {
id: number,
display_name: string
},
field: {
display_name: string,
id: number,
description: string
},
histogram: {
value: {}
}
},
params: {
cost: string,
fieldId: number
},
}
const Periodicity = ({fingerprint}) =>
......@@ -80,7 +96,7 @@ class FieldXRay extends Component {
}
componentDidUpdate (prevProps) {
componentDidUpdate (prevProps: Props) {
if(prevProps.params.cost !== this.props.params.cost) {
this.fetchFieldFingerprint()
}
......
......@@ -22,7 +22,22 @@ import Constituent from 'metabase/xray/components/Constituent'
type Props = {
fetchSegmentFingerPrint: () => void,
fingerprint: {}
constituents: [],
fingerprint: {
table: {
id: number,
display_name: string
},
segment: {
id: number,
name: string,
description: string
}
},
params: {
segmentId: number,
cost: string,
}
}
const mapStateToProps = state => ({
......@@ -49,7 +64,7 @@ class SegmentXRay extends Component {
this.props.fetchSegmentFingerPrint(params.segmentId, cost)
}
componentDidUpdate (prevProps) {
componentDidUpdate (prevProps: Props) {
if(prevProps.params.cost !== this.props.params.cost) {
this.fetchSegmentFingerPrint()
}
......
......@@ -23,9 +23,16 @@ import LoadingAndErrorWrapper from 'metabase/components/LoadingAndErrorWrapper'
type Props = {
constituents: [],
fetchTableFingerPrint: () => void,
fingerprint: {},
fingerprint: {
table: {
id: number,
display_name: string,
description: string
}
},
params: {
tableId: number
tableId: number,
cost: string
}
}
......@@ -53,7 +60,7 @@ class TableXRay extends Component {
this.props.fetchTableFingerPrint(params.tableId, cost)
}
componentDidUpdate (prevProps) {
componentDidUpdate (prevProps: Props) {
if(prevProps.params.cost !== this.props.params.cost) {
this.fetchTableFingerPrint()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment