Minor improvements on section initialization.

This commit is contained in:
Andrey Antukh 2021-08-31 15:22:32 +02:00 committed by Andrés Moya
parent daeaf14032
commit 8af46ac7fc
11 changed files with 96 additions and 82 deletions

View file

@ -23,10 +23,11 @@
(mf/use-effect
(mf/deps team)
(fn []
(dom/set-html-title (tr "title.dashboard.shared-libraries"
(if (:is-default team)
(tr "dashboard.your-penpot")
(:name team))))))
(when team
(let [tname (if (:is-default team)
(tr "dashboard.your-penpot")
(:name team))]
(dom/set-html-title (tr "title.dashboard.shared-libraries" tname))))))
(mf/use-effect
(st/emitf (dd/fetch-shared-files)