Stack modals forever

This commit is contained in:
Jonathan Staab 2023-04-24 12:04:33 -05:00
parent db583e7ff2
commit 2835ec170d

View File

@ -54,15 +54,7 @@
return showContext ? true : !r.isContext
})
// If we're already in a note detail modal, don't infinitely nest. But if we're in
// some other modal, make it possible to go back.
const goToNote = data => {
if (modal.getCurrent()?.type === "note/detail") {
modal.replace({type: "note/detail", ...data})
} else {
modal.push({type: "note/detail", ...data})
}
}
const goToNote = data => modal.push({type: "note/detail", ...data})
const onClick = e => {
const target = e.target as HTMLElement