aboutsummaryrefslogtreecommitdiff
path: root/src/main.ts
diff options
context:
space:
mode:
authorJoris2023-09-09 13:50:17 +0200
committerJoris2023-09-09 13:50:17 +0200
commit82429caf3c2886c2d94e09d020e645b06bd4680d (patch)
tree3183bf0c687c25e17fd36a23ced58fd1e6e29dda /src/main.ts
parent08a5f3519f29cd486d7fe4c295e5d5c7f031104a (diff)
Allow to open book detail in modal
Diffstat (limited to 'src/main.ts')
-rw-r--r--src/main.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/main.ts b/src/main.ts
index 21bf215..5885871 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,8 +1,9 @@
-import { h, withVar, mount } from 'lib/rx'
+import { h, withVar, mount, Html } from 'lib/rx'
import * as Search from 'lib/search'
import * as Functions from 'lib/functions'
import * as I18n from 'lib/i18n'
import * as Filters from 'view/filters'
+import * as Books from 'view/books'
import * as Book from 'book'
// @ts-ignore
@@ -34,12 +35,7 @@ mount(withVar<Filters.Model>({}, (filters, updateFilters) =>
),
filteredBooks.map(fb => I18n.unit(fb.length, 'livre', 'livres'))
),
- h('div',
- { className: 'g-Books' },
- filteredBooks.map(fb =>
- fb.map(book => h('img', { className: 'g-Book', src: book.cover }))
- )
- )
+ Books.view(filteredBooks)
)
]
})