SparkAdmin: Fix Lazy Nav

This commit is contained in:
Michael Harding committed 2018-07-10 10:41:49 -04:00
1 parent fdcd245ef5
commit dcf6c69ef9
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ open ServiceContext
let topLevel (sc:ServiceContext.ServiceContext) currentPage dispatch content =
div
[ Class "columns is-fullheight" ]
[ Nav.root currentPage sc dispatch
[ Nav.navRoot currentPage sc dispatch
div [ Class "column is-main-content" ]
[ content]
(*
+3 -1
View File
@@ -17,6 +17,8 @@ open Fable.Helpers.React.Props
open Elmish.React.Common
open ServiceContext
open Fable.Helpers
open Imports
open Fable.Import.React
let isCurrentPage page currentPage =
match page, currentPage with
@@ -57,4 +59,4 @@ let root (currentPage:Page) (sc:ServiceContext) dispatch =
]
]
//let navRoot = lazyView3With (fun a b -> isCurrentPage (fst a) (fst b)) root
let (navRoot: 'a -> ServiceContext -> Dispatch<Msg> -> ReactElement) = lazyView3With (fun b c -> isCurrentPage (fst b) (fst c)) root