aboutsummaryrefslogtreecommitdiff
path: root/src/main.ts
diff options
context:
space:
mode:
authorJoris2023-02-19 14:39:02 +0100
committerJoris2023-02-19 14:39:02 +0100
commite0699eed72c5682bd2395ba4299ff69933c83d48 (patch)
treeb5601a32492b70ec9458738a64bac6d6e15802cc /src/main.ts
parentbb058d35c7110dcffe31b4e7afabbe26673a43a8 (diff)
Be more precise configuring chordsHEADmain
Diffstat (limited to 'src/main.ts')
-rw-r--r--src/main.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.ts b/src/main.ts
index bba799e..e588aab 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,4 +1,4 @@
-import { h, withVar, mount } from 'lib/rx'
+import { h, withState, mount } from 'lib/rx'
import * as Form from 'view/form'
import * as Play from 'view/play'
import * as Options from 'view/options'
@@ -9,9 +9,9 @@ enum Page {
}
mount(
- withVar(Page.Form, (page, updatePage) => [
+ withState(Page.Form, page => [
h('header',
- { onclick: () => updatePage(_ => Page.Form) },
+ { onclick: () => page.update(_ => Page.Form) },
'Chords'
),
page.map(p =>
@@ -20,7 +20,7 @@ mount(
options: Options.load(),
onSubmit: (options: Options.Model) => {
Options.save(options)
- updatePage(_ => Page.Play)
+ page.update(_ => Page.Play)
}
})
: Play.view({