about summary refs log tree commit diff
path: root/scratch/habit-screens/client/src/Main.elm
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-10-10T16·04+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-10-10T16·04+0100
commit9d331f307747d062ea9de07f553864cff9ed918a (patch)
tree7a14b57aff15c8f6c13b3a9745d4b17385ed494b /scratch/habit-screens/client/src/Main.elm
parent02ce74eada9df71f760bef4dc0eccddab8d6fbfe (diff)
Begin working on Habit Screens project
Created a small MVP for digitizing my weekly habits. Much more to come.

Lots of things happening:

- Copied the boilerplate to get started
- Added a brief project-level README
- Outlined my ambitions in design.md

See README and design.md for more context on this project.
Diffstat (limited to 'scratch/habit-screens/client/src/Main.elm')
-rw-r--r--scratch/habit-screens/client/src/Main.elm27
1 files changed, 27 insertions, 0 deletions
diff --git a/scratch/habit-screens/client/src/Main.elm b/scratch/habit-screens/client/src/Main.elm
new file mode 100644
index 000000000000..d2b36a33f322
--- /dev/null
+++ b/scratch/habit-screens/client/src/Main.elm
@@ -0,0 +1,27 @@
+module Main exposing (main)
+
+import Browser
+import Habits
+import Html exposing (..)
+import State
+
+
+subscriptions : State.Model -> Sub State.Msg
+subscriptions model =
+    Sub.none
+
+
+view : State.Model -> Html State.Msg
+view model =
+    case model.view of
+        State.Habits ->
+            Habits.render model
+
+
+main =
+    Browser.element
+        { init = \() -> State.init
+        , subscriptions = subscriptions
+        , update = State.update
+        , view = view
+        }