attempting to fix window not available on build
This commit is contained in:
parent
48680dfd5b
commit
4bbb5e5cde
2 changed files with 25 additions and 11 deletions
|
|
@ -7,14 +7,28 @@ import SEO from "../components/seo"
|
|||
import data from './default-kedro157.json'
|
||||
import KedroViz from '@quantumblack/kedro-viz';
|
||||
|
||||
const IndexPage = () => (
|
||||
<Layout>
|
||||
<SEO title="Home" />
|
||||
<h1>default kedro pipeline</h1>
|
||||
<div className="pipeline" style={{ minHeight: '80vh' }}>
|
||||
<KedroViz style={{ minHeight: '80vh' }} data={data} />
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
class IndexPage extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
loaded: false
|
||||
}
|
||||
this.componentDidMount = () => {
|
||||
this.setState({ loaded: false })
|
||||
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<Layout>
|
||||
<SEO title="Home" />
|
||||
<h1>default kedro pipeline</h1>
|
||||
<div className="pipeline" style={{ minHeight: '80vh' }}>
|
||||
{this.state.loaded === false ? 'loading' : <KedroViz style={{ minHeight: '80vh' }} data={data} />}
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default IndexPage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue