fix: close medication detail modal before navigating to edit (#37)
When clicking 'Edit' in the medication detail modal, the modal now properly closes before navigating to the medications page. Previously the modal remained visible behind the edit form.
This commit is contained in:
@@ -3285,7 +3285,7 @@ function AppContent() {
|
||||
<button className="success" onClick={openRefillModal}>
|
||||
{t('refill.button')}
|
||||
</button>
|
||||
<button className="info" onClick={() => { closeMedDetail(); navigate("/medications"); startEdit(selectedMed); }}>
|
||||
<button className="info" onClick={() => { setSelectedMed(null); navigate("/medications"); startEdit(selectedMed); }}>
|
||||
{t('common.edit')}
|
||||
</button>
|
||||
{selectedMed.blisters.length > 0 && (
|
||||
|
||||
Reference in New Issue
Block a user