From 209df804580093dd4c8757890d583c7efa0aaa36 Mon Sep 17 00:00:00 2001 From: ivan-sim Date: Wed, 10 Jan 2024 15:32:44 +0700 Subject: [PATCH] Update --- frontend/hospital-portal/public/lang/en-US.json | 7 ++++++- frontend/hospital-portal/public/lang/id-ID.json | 7 ++++++- .../dashboard/header/NotificationsPopover.tsx | 12 +++++++----- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/frontend/hospital-portal/public/lang/en-US.json b/frontend/hospital-portal/public/lang/en-US.json index 48afb22c..e68015ca 100644 --- a/frontend/hospital-portal/public/lang/en-US.json +++ b/frontend/hospital-portal/public/lang/en-US.json @@ -40,5 +40,10 @@ "txtProvider": "Provider", "txtAlertProvider" : "Please enter provider", "txtHelp" : "Need help?", - "txtContactUs" : "Contact Us" + "txtContactUs" : "Contact Us", + "txtNotifications" : "Notifications", + "txtYouHave" : "You have", + "txtUnm" : "unread messages", + "txtNew" : "New", + "txtBeforeThat" : "Before that" } diff --git a/frontend/hospital-portal/public/lang/id-ID.json b/frontend/hospital-portal/public/lang/id-ID.json index 57bb37f9..7b95ede9 100644 --- a/frontend/hospital-portal/public/lang/id-ID.json +++ b/frontend/hospital-portal/public/lang/id-ID.json @@ -40,5 +40,10 @@ "txtProvider": "Provider", "txtAlertProvider" : "Mohon masukan provider", "txtHelp" : "Butuh Bantuan?", - "txtContactUs" : "Kontak Kami" + "txtContactUs" : "Kontak Kami", + "txtNotifications" : "Notifikasi", + "txtYouHave" : "Anda memiliki", + "txtUnm" : "pesan yang belum dibaca", + "txtNew" : "Baru", + "txtBeforeThat" : "Sebelum" } diff --git a/frontend/hospital-portal/src/layouts/dashboard/header/NotificationsPopover.tsx b/frontend/hospital-portal/src/layouts/dashboard/header/NotificationsPopover.tsx index 4771961c..4800a2b7 100644 --- a/frontend/hospital-portal/src/layouts/dashboard/header/NotificationsPopover.tsx +++ b/frontend/hospital-portal/src/layouts/dashboard/header/NotificationsPopover.tsx @@ -1,5 +1,5 @@ import { noCase } from 'change-case'; -import { useState, useEffect } from 'react'; +import { useState, useEffect, useContext } from 'react'; // @mui import { Box, @@ -27,10 +27,12 @@ import MenuPopover from '@/components/MenuPopover'; import { IconButtonAnimate } from '@/components/animate'; import axios from '@/utils/axios'; import { useSnackbar } from 'notistack'; +import { LanguageContext } from '@/contexts/LanguageContext'; // ---------------------------------------------------------------------- export default function NotificationsPopover() { + const { localeData }: any = useContext(LanguageContext); const [notifications, setNotifications] = useState([]); const {enqueueSnackbar} = useSnackbar(); const getDataNotifications = async () => { @@ -88,9 +90,9 @@ export default function NotificationsPopover() { > - Notifications + {localeData.txtNotifications} - You have {totalUnRead} unread messages + {localeData.txtYouHave} {totalUnRead} {localeData.txtUnm} @@ -112,7 +114,7 @@ export default function NotificationsPopover() { disablePadding subheader={ - New + {localeData.txtNew} } > @@ -125,7 +127,7 @@ export default function NotificationsPopover() { disablePadding subheader={ - Before that + {localeData.txtBeforeThat} } >