From 82429caf3c2886c2d94e09d020e645b06bd4680d Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 9 Sep 2023 13:50:17 +0200 Subject: Allow to open book detail in modal --- src/main.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/main.ts') 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, 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) ) ] }) -- cgit v1.2.3