refactor(logging): replace console usage with logger

This commit is contained in:
William Valentin
2025-09-23 12:19:15 -07:00
parent 16bd4a8b20
commit 10d1de91fe
11 changed files with 76 additions and 44 deletions

View File

@@ -1,6 +1,7 @@
import React, { useState, useEffect, useRef } from 'react';
import { Medication, Frequency } from '../../types';
import { medicationIcons } from '../icons/Icons';
import { logger } from '../../services/logging';
interface EditMedicationModalProps {
isOpen: boolean;
@@ -72,7 +73,7 @@ const EditMedicationModal: React.FC<EditMedicationModalProps> = ({
icon,
});
} catch (error) {
console.error('Failed to update medication', error);
logger.ui.error('Failed to update medication', error as Error);
alert('There was an error updating your medication. Please try again.');
setIsSaving(false);
}