diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 15:27:05 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 16:43:33 +0100 |
commit | 28417d795a6922c3df3c2c0aea78a51648b0428e (patch) | |
tree | 28af6bd86e2127003855574b4c777efa1cd07207 /editor/actions/add_page.ml | |
parent | 72e3b16bbd258e63f047392c973ba5e8f0a823c8 (diff) |
Added import button in editor
Diffstat (limited to 'editor/actions/add_page.ml')
-rwxr-xr-x | editor/actions/add_page.ml | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/editor/actions/add_page.ml b/editor/actions/add_page.ml index 4a3fcf3..e5e8541 100755 --- a/editor/actions/add_page.ml +++ b/editor/actions/add_page.ml @@ -13,13 +13,7 @@ module M = struct : t -> State.t -> State.t = fun {title} state -> let page_id = key_of_title title in - let new_date = (new%js Js.date_now)##getTime in - let content_obj = object%js - val content = Js.null - val title = Js.some title - val date = Js.some new_date - end in - State.load_page (Some page_id) state content_obj + State.new_page ~title (Some page_id) state end (** Create a new element *) |