Skip to content

Commit e2b1f3f

Browse files
committed
cleanup home for demo
1 parent 2f4fdfe commit e2b1f3f

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ There are no "partials" or "components" in the traditional sense. On every chang
3131

3232
Of course views are just functions calling functions, so you can pull common functionality (dialogs, forms, buttons, etc) into functions accessible from a shared namespace.
3333

34+
Here is the view in the demo application that renders the registration page:
35+
36+
https://github.com/Ramblurr/hifi-crud/blob/2f4fdfee36b8155d9e80338ad74569647f8271e5/src/app/auth/register.clj#L68-L114
37+
38+
3439
## The State
3540

3641
There are two sources of backend state:

src/app/auth/register.clj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,15 @@
4646
(unique-conflict-error data)
4747
(unhandled-tx-error e data))))
4848

49-
(defn validate-command [cofx {:keys [signals]}]
49+
(defn validate-command
50+
"Handle registration form interactive validation"
51+
[cofx {:keys [signals]}]
5052
{:outcome/effects
5153
[(forms/validate-form (RegisterForm cofx) signals)]})
5254

53-
(defn submit-command [cofx {:keys [signals]}]
55+
(defn submit-command
56+
"Handle registration form submission"
57+
[cofx {:keys [signals]}]
5458
(let [errors (forms/validate-form (RegisterForm cofx) signals :clear? false)]
5559
(if false
5660
{:outcome/effects [errors]}

src/app/home/index.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@
5454
[:div {:id "notification-container" :class "flex w-full flex-col items-center space-y-4 sm:items-end"}
5555
(for [notif notifications]
5656
(let [{:keys [id title text]} notif]
57-
(notification id title text)))
58-
#_(notification "notif-saved" "Succesfully saved!" "Anyone with a link can now view this file.")]])
57+
(notification id title text)))]])
5958

6059
(defn render-home-logged-out [{:keys [url-for] :as req}]
6160
(let [link-cls "text-sm font-medium text-teal-600 underline"]

src/app/home/queries.clj

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)