Skip to content

Commit

Permalink
feat(ui change in src/patients/generalinformation.tsx): put "Unknown"…
Browse files Browse the repository at this point in the history
… checkbox under "Date of Birth"

HospitalRun#2216
  • Loading branch information
Hrugved committed Jul 9, 2020
1 parent 192fb46 commit 69447bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/patients/GeneralInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const GeneralInformation = (props: Props): ReactElement => {
</div>
</div>
<div className="row">
<div className="col">
<div className="col-md-4">
{patient.isApproximateDateOfBirth ? (
<TextInputWithLabelFormGroup
label={t('patient.approximateAge')}
Expand All @@ -195,8 +195,6 @@ const GeneralInformation = (props: Props): ReactElement => {
feedback={t(error?.dateOfBirth)}
/>
)}
</div>
<div className="col">
<div className="form-group">
<Checkbox
label={t('patient.unknownDateOfBirth')}
Expand Down
7 changes: 1 addition & 6 deletions src/shared/hooks/useTranslator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { useTranslation } from 'react-i18next'
export default function useTranslator() {
const { t } = useTranslation()

const translate = useCallback(
(key: any): any => {
return key !== undefined ? t(key) : undefined
},
[t],
)
const translate = useCallback((key: any): any => (key !== undefined ? t(key) : undefined), [t])

return {
t: translate,
Expand Down

0 comments on commit 69447bc

Please sign in to comment.