Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
fix(patients): fix broken name display in view patient adn lsit patient
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcmeyer committed Dec 17, 2019
1 parent e4cf64d commit 8ff0ac9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/containers/HospitalRun.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { useSelector } from 'react-redux'
import Sidebar from '../components/Sidebar'
import Permissions from '../util/Permissions'
import Dashboard from './Dashboard'
import Patients from '../patients/patients/Patients'
import Patients from '../patients/list/Patients'
import NewPatient from '../patients/new/NewPatient'
import ViewPatient from './ViewPatient'
import ViewPatient from '../patients/view/ViewPatient'
import { RootState } from '../store'
import Navbar from '../components/Navbar'
import PrivateRoute from '../components/PrivateRoute'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const Patients = () => {
<ul>
{patients.map((p) => (
<Link to={`/patients/${p.id}`} key={p.id}>
<li key={p.id}>{p.name}</li>
<li key={p.id}>
{p.name.given} {p.name.family}
</li>
</Link>
))}
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { useDispatch, useSelector } from 'react-redux'
import { withRouter, useParams } from 'react-router-dom'
import { Spinner } from '@hospitalrun/components'
import { useTranslation } from 'react-i18next'
import useTitle from '../util/useTitle'
import { fetchPatient } from '../patients/patient-slice'
import { RootState } from '../store'
import useTitle from '../../util/useTitle'
import { fetchPatient } from '../patient-slice'
import { RootState } from '../../store'

const ViewPatient = () => {
const { t } = useTranslation()
Expand All @@ -26,8 +26,7 @@ const ViewPatient = () => {

return (
<div className="container">
{patient.id}
<h1>{`${patient.name}`}</h1>
<h1>{`${patient.name.given} ${patient.name.family}`}</h1>
</div>
)
}
Expand Down

0 comments on commit 8ff0ac9

Please sign in to comment.