diff options
Diffstat (limited to 'frontend/app/Page.hs')
-rw-r--r-- | frontend/app/Page.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/frontend/app/Page.hs b/frontend/app/Page.hs index c7b393f..e1c8415 100644 --- a/frontend/app/Page.hs +++ b/frontend/app/Page.hs @@ -7,12 +7,14 @@ module Page ) where +import Collection import Control.Monad.Catch (SomeException) import Data.Bifunctor import Data.Default import Data.Function import Effect (Eff) import Miso +import Miso.String (fromMisoString) import Page.EditValue qualified as EditValue import Page.ListCollection qualified as ListCollection import Page.NewCollection qualified as NewCollection @@ -34,9 +36,9 @@ instance Default Page where initialPage :: Route -> JSM (Either SomeException Page) initialPage Route.Home = pure (Right Home) initialPage (Route.ListCollection c) = - fmap ListCollection <$> ListCollection.initialModel c + fmap ListCollection <$> ListCollection.initialModel (Collection (fromMisoString c)) initialPage (Route.EditValue c f) = - fmap EditValue <$> EditValue.initialModel c f + fmap EditValue <$> EditValue.initialModel (CollectionItem (Collection (fromMisoString c)) (fromMisoString f)) initialPage Route.NewCollection = fmap NewCollection <$> NewCollection.initialModel |