Show current page in browser title

This commit is contained in:
Andrés Moya 2021-03-22 13:41:12 +01:00 committed by Andrey Antukh
parent 0008a2aa48
commit 6383dc0952
16 changed files with 202 additions and 15 deletions

View file

@ -271,6 +271,13 @@
(let [data (mf/deref refs/viewer-data)
state (mf/deref refs/viewer-local)]
(mf/use-effect
(mf/deps (:file data))
#(when (:file data)
(dom/set-html-title (tr "title.viewer"
(get-in data [:file :name])))))
(when (and data state)
[:& viewer-content
{:index index