Skip to content

Commit

Permalink
changed notification to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Kiprotich committed Jan 20, 2025
1 parent de352b4 commit fe67ffc
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const FacilityInfo: React.FC = () => {
const { defaultFacility, isLoading: defaultFacilityLoading, error, refetch } = useFacilityInfo(shouldSynchronize);

const [facilityData, setFacilityData] = useState<FacilityData>(defaultFacility);
useEffect(() => {
setFacilityData(defaultFacility);
}, [defaultFacility]);

const synchronizeFacilityData = async () => {
try {
Expand All @@ -23,10 +26,10 @@ const FacilityInfo: React.FC = () => {
isLowContrast: true,
});
if (defaultFacility?.source != 'HIE') {
showNotification({
kind: 'error',
title: 'Error',
description: 'HIE Sync Failed. Pulling local info.',
showSnackbar({
kind: 'warning',
title: 'HIE Sync Failed. Pulling local info.',
isLowContrast: true,
});
}
} catch (error) {
Expand Down Expand Up @@ -67,7 +70,7 @@ const FacilityInfo: React.FC = () => {
<hr className={styles.cardDivider} />
<div className={styles.cardContent}>
<p>
<strong>Facility Name:</strong> {facilityData?.display || 'N/A'}
<strong>Facility Name:</strong> {facilityData?.display}
</p>
<p>
<strong>Facility KMHFR Code:</strong> {facilityData?.mflCode}
Expand Down

0 comments on commit fe67ffc

Please sign in to comment.