Skip to content

Commit

Permalink
(fix): Wrap dashboard title in t function
Browse files Browse the repository at this point in the history
  • Loading branch information
NethmiRodrigo committed Oct 29, 2024
1 parent 24410ed commit 4dcbd45
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { Calendar } from '@carbon/react/icons';
import { useSession } from '@openmrs/esm-framework';
import { useTranslation } from 'react-i18next';

import styles from './ohri-welcome-section.scss';

Expand All @@ -11,13 +12,14 @@ interface OHRIWelcomeSectionProps {

export const OHRIWelcomeSection: React.FC<OHRIWelcomeSectionProps> = ({ title, icon }) => {
const userSession = useSession();
const { t } = useTranslation();
return (
<div className={styles.welcomeContainer}>
<div className={styles.welcomeIcon}>{icon}</div>
<div className={styles.welcomeDetails}>
<div className={styles.location}>{userSession?.sessionLocation.display}</div>
<div className={styles.dashboardDetails}>
<div className={styles.dashboardTitle}>{title}</div>
<div className={styles.dashboardTitle}>{t(title)}</div>
<div className={styles.currentDate}>
<Calendar size={32} className={styles.calendarIcon} />
{new Date().toLocaleDateString() + ''}
Expand Down

0 comments on commit 4dcbd45

Please sign in to comment.