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

field xray title

parent 0343f541
Branches
Tags
No related merge requests found
......@@ -241,7 +241,7 @@ export const getRoutes = (store) =>
<Route path="databases/:databaseId/tables/:tableId/questions" component={TableQuestionsContainer} />
</Route>
{/* REFERENCE */}
<Route path="/xray" title="xray">
<Route path="/xray" title="XRay">
<Route path="segment/:segmentId" component={SegmentXRay} />
<Route path="table/:tableId" component={TableXRay} />
<Route path="field/:fieldId" component={FieldXRay} />
......
......@@ -2,6 +2,7 @@
import React, { Component } from 'react'
import { connect } from 'react-redux'
import title from "metabase/hoc/Title";
import { fetchFieldFingerPrint } from 'metabase/reference/reference'
......@@ -32,6 +33,16 @@ const FieldOverview = ({ fingerprint, stats }) =>
const Heading = ({ heading }) =>
<h3 className="py2 border-bottom mb3">{heading}</h3>
const mapStateToProps = state => ({
fingerprint: getFieldFingerprint(state)
})
const mapDispatchToProps = {
fetchFieldFingerPrint
}
@connect(mapStateToProps, mapDispatchToProps)
@title(({ fingerprint }) => fingerprint && fingerprint.field.display_name || "Field")
class FieldXRay extends Component {
props: Props
......@@ -120,12 +131,6 @@ class FieldXRay extends Component {
}
}
const mapStateToProps = state => ({
fingerprint: getFieldFingerprint(state)
})
export default FieldXRay
const mapDispatchToProps = {
fetchFieldFingerPrint
}
export default connect(mapStateToProps, mapDispatchToProps)(FieldXRay)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment