UNPKG

cluedin-widget

Version:

This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.

33 lines (27 loc) 835 B
import React, { Component } from 'react'; import CluedInFrame from './cluedInFrame.jsx'; import { StyleRoot, Style } from 'radium'; import { mainApp } from '../theme'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import { shouldFetchScema } from '../action/entity'; import { connect } from 'react-redux'; class MainApp extends Component { componentWillMount() { this.props.dispatch(shouldFetchScema()); } render() { const { q, id } = this.props.params; return (<MuiThemeProvider><StyleRoot> <div className="root"> <Style scopeSelector=".root" rules={mainApp} /> <CluedInFrame id={id} q={q}> {this.props.children} </CluedInFrame> </div> </StyleRoot></MuiThemeProvider>); } } export default connect()(MainApp);