diff options
author | Joris | 2023-02-19 14:39:02 +0100 |
---|---|---|
committer | Joris | 2023-02-19 14:39:02 +0100 |
commit | e0699eed72c5682bd2395ba4299ff69933c83d48 (patch) | |
tree | b5601a32492b70ec9458738a64bac6d6e15802cc /src/main.ts | |
parent | bb058d35c7110dcffe31b4e7afabbe26673a43a8 (diff) |
Diffstat (limited to 'src/main.ts')
-rw-r--r-- | src/main.ts | 8 |
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({ |