This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6d712b
commit c220b96
Showing
8 changed files
with
105 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React, { Component } from 'react'; | ||
|
||
class Dashboard extends Component { | ||
render() { | ||
return ( | ||
<h1>Hello Dashboard</h1> | ||
); | ||
} | ||
} | ||
|
||
export default Dashboard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React, { Component } from 'react'; | ||
import { Switch, Route, withRouter, RouteComponentProps } from 'react-router-dom'; | ||
import { Navbar } from '@hospitalrun/components'; | ||
import Dashboard from './Dashboard'; | ||
import Patient from './Patient'; | ||
import Patients from './Patients'; | ||
import NewPatient from './NewPatient'; | ||
|
||
class HospitalRun extends Component<RouteComponentProps, {}> { | ||
constructor(props: RouteComponentProps) { | ||
super(props); | ||
this.noOpHandler = this.noOpHandler.bind(this); | ||
} | ||
|
||
noOpHandler() { | ||
console.log('no op'); | ||
} | ||
|
||
navigate(route: string) { | ||
this.props.history.push(route); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<Navbar | ||
brand={{ | ||
label: 'HospitalRun', | ||
onClick: () => {this.navigate('/')} | ||
}} | ||
bg="light" | ||
variant="light" | ||
onSeachButtonClick={this.noOpHandler} | ||
onSearchTextBoxChange={this.noOpHandler} | ||
navLinks={[{ label: 'Patients', onClick: () => {this.navigate('/patients')}, children: [] }]} | ||
/> | ||
<div> | ||
<Switch> | ||
<Route exact path="/" component={Dashboard} /> | ||
<Route exact path="/patients" component={Patients} /> | ||
<Route exact path="/new/patient" component={NewPatient} /> | ||
<Route exact path="/patients/:id" component={Patient} /> | ||
</Switch> | ||
</div> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default withRouter(HospitalRun); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React, { Component } from 'react'; | ||
|
||
class NewPatient extends Component { | ||
render() { | ||
return ( | ||
<h1>New Patient</h1> | ||
); | ||
} | ||
} | ||
|
||
export default NewPatient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React, { Component } from 'react'; | ||
|
||
class Patient extends Component { | ||
render() { | ||
return ( | ||
<h1>Patient</h1> | ||
); | ||
} | ||
} | ||
|
||
export default Patient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React, { Component } from 'react'; | ||
|
||
class Patients extends Component { | ||
render() { | ||
return ( | ||
<div> | ||
<h1>Patients</h1> | ||
</div> | ||
|
||
); | ||
} | ||
} | ||
|
||
export default Patients; |
Binary file not shown.