Fixes bug with client page

This commit is contained in:
2024-04-01 19:46:37 -07:00
parent 3957286624
commit 72a17486cd
4 changed files with 58 additions and 18 deletions

View File

@@ -223,7 +223,9 @@
:render (fn [{:client/keys [locked-until bank-accounts]}]
[:div.flex.gap-2.flex-wrap
(if locked-until
(let [days-since-locked (time/in-days (time/interval locked-until (time/now)))]
(let [days-since-locked (try (time/in-days (time/interval locked-until (time/now)))
(catch Exception _
0))]
(cond
(< days-since-locked 90)
(com/pill {:color :primary} (format "Locked %s" (atime/unparse-local locked-until atime/normal-date)))