diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-10-11 23:30:56 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-10-11 23:30:56 +0200 |
commit | 80a6150610182eefa0deb1f0932d3b780456ca09 (patch) | |
tree | 4471a8ffecfc527d6b9c2a5c48e445e7a4d6a74f /frontend/app/Page.hs | |
parent | 2e0cf98254976e443ea7f693961fc105ed6cf563 (diff) |
use backend REST library for frontend
Diffstat (limited to 'frontend/app/Page.hs')
-rw-r--r-- | frontend/app/Page.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/app/Page.hs b/frontend/app/Page.hs index 3218ae6..c7b393f 100644 --- a/frontend/app/Page.hs +++ b/frontend/app/Page.hs @@ -7,6 +7,7 @@ module Page ) where +import Control.Monad.Catch (SomeException) import Data.Bifunctor import Data.Default import Data.Function @@ -30,7 +31,7 @@ newtype Action = Action (Page -> (Effect Action Page, [Eff])) instance Default Page where def = Home -initialPage :: Route -> JSM (Either String Page) +initialPage :: Route -> JSM (Either SomeException Page) initialPage Route.Home = pure (Right Home) initialPage (Route.ListCollection c) = fmap ListCollection <$> ListCollection.initialModel c |