mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Handle escape on labels modal
This commit is contained in:
parent
3683447b6e
commit
defef6917a
1 changed files with 9 additions and 1 deletions
|
|
@ -251,6 +251,14 @@ export default function Home(): JSX.Element {
|
|||
name: 'Back to library',
|
||||
shortcut: ['escape'],
|
||||
perform: () => {
|
||||
if (
|
||||
readerSettings.showSetLabelsModal ||
|
||||
readerSettings.showDeleteConfirmation ||
|
||||
readerSettings.showDeleteConfirmation ||
|
||||
readerSettings.showEditDisplaySettingsModal
|
||||
) {
|
||||
return
|
||||
}
|
||||
const query = window.sessionStorage.getItem('q')
|
||||
if (query) {
|
||||
router.push(`/home?${query}`)
|
||||
|
|
@ -353,7 +361,7 @@ export default function Home(): JSX.Element {
|
|||
perform: () => setShowEditModal(true),
|
||||
},
|
||||
],
|
||||
[]
|
||||
[readerSettings]
|
||||
)
|
||||
|
||||
if (articleFetchError && articleFetchError.indexOf('NOT_FOUND') > -1) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue