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:
Daniel Volz
2026-01-17 23:08:04 +01:00
committed by GitHub
parent 288e075786
commit cfd37ca526
+1 -1
View File
@@ -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 && (