File tree Expand file tree Collapse file tree 1 file changed +26
-3
lines changed
Expand file tree Collapse file tree 1 file changed +26
-3
lines changed Original file line number Diff line number Diff line change 55 [components.garden :as components.garden]
66 [doctor.ui.db :as ui.db]
77 [doctor.ui.hooks.use-db :as hooks.use-db]
8+ [doctor.ui.hooks.use-workspaces :as hooks.use-workspaces]
89 [doctor.ui.hooks.plasma :refer [with-rpc]]
9- [doctor.ui.handlers :as handlers]))
10+ [doctor.ui.handlers :as handlers]
11+
12+ [doctor.ui.views.workspaces :as views.workspaces]
13+ ))
1014
1115(defn use-recent-garden-notes []
1216 (let [[notes set-notes] (uix/use-state nil )
2226 {:notes notes}))
2327
2428(defui page [opts]
25- (let [{:keys [notes]} (use-recent-garden-notes )]
29+ (let [{:keys [notes]} (use-recent-garden-notes )
30+
31+ {:keys [active-workspaces
32+ all-clients]}
33+ (hooks.use-workspaces/use-workspaces )
34+
35+ journal-workspace (some->> active-workspaces
36+ (filter #(#{" journal" } (:workspace/title %)))
37+ first)
38+ ]
2639 ($ :div
2740 (for [[i note] (map-indexed vector notes)]
2841 ($ :div
2942 {:key i
3043 :class [" p-2"
3144 " bg-slate-800"
3245 " xl:mx-48" " mx-16" " mt-16" ]}
33- ($ components.garden/org-file (assoc opts :item note)))))))
46+
47+ ($ components.garden/org-file (assoc opts :item note))))
48+
49+ ; ; TODO add a workspace comp
50+ ($ views.workspaces/workspace-card (assoc opts :workspace journal-workspace))
51+
52+
53+ ; ; TODO add an active-app lists
54+
55+
56+ )))
You can’t perform that action at this time.
0 commit comments