Skip to content

Commit

Permalink
fix(): routes to medical analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
hopetambala committed Apr 25, 2019
1 parent a286d81 commit 1567bd6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 2 additions & 0 deletions src/js/components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { BrowserRouter as Router, Route, Link } from "react-router-dom";
//Pages
import { HomePage } from "../pages/Home";
import { ExportPage } from "../pages/DataExport";
import { MedicalEvalAnalytics} from '../pages/MedicalEval';

//Apollo
import ApolloClient from "apollo-boost";
Expand Down Expand Up @@ -59,6 +60,7 @@ export default class Layout extends React.Component {

<Route exact path="/" component={HomePage} />
<Route path="/dataexport" component={ExportPage} />
<Route path="/medicalanalytics" component={MedicalEvalAnalytics} />

</Router>
</ApolloProvider>
Expand Down
36 changes: 17 additions & 19 deletions src/js/pages/Home.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import React from 'react';
import { Row, Container } from 'react-bootstrap';
import { BrowserRouter as Route, Link } from "react-router-dom";

//Components
import { Boxx } from '../components/widget/Boxx/Boxx';
import { Map } from '../components/widget/Map/Map';
import { LeafletMap } from '../components/widget/Map/LeafletMap';

import { BarChart } from '../components/d3/barchart/BarChart';

//Pages
import {MedicalEvalAnalytics} from '../pages/MedicalEval';


const styles = {
container: {
Expand All @@ -28,34 +32,28 @@ const styles = {
}

export class HomePage extends React.Component {
constructor(props){
super(props)
}

render() {
return (
<Container style={styles.container}>
<BarChart data={[5,10,1,3,10,20,30]} size={[500,500]}></BarChart>
{/*<BarChart data={[5,10,1,3,10,20,30]} size={[500,500]}></BarChart>*/}

<Row style={styles.row}>
<Boxx/>
<Boxx/>

<Link to="/medicalanalytics" ><Boxx/></Link>

<Boxx/>
<Boxx/>
</Row>
<Row style={styles.row}>
<Map/>
</Row>
<Row>
{/*<Query query={fl}>
{({ data, loading, error }) => {
if (loading) return <p>Loading...</p>;
if (error) return <p>Error :(</p>;
return data.getPeople.map(({ fname, lname }) =>
//<div key={fname}>
// <h1>{fname}: {lname}</h1>
//</div>
console.log(fname,lname)
);
}}
</Query> */}
<LeafletMap />
</Row>



</Container>
);
}
Expand Down

0 comments on commit 1567bd6

Please sign in to comment.