|
@@ -1,6 +1,8 @@
|
|
|
module LinkedIn.Output where
|
|
module LinkedIn.Output where
|
|
|
|
|
|
|
|
-import Data.Either (Either)
|
|
|
|
|
|
|
+import Prelude
|
|
|
|
|
+
|
|
|
|
|
+import Data.Either (Either(..))
|
|
|
import Effect (Effect)
|
|
import Effect (Effect)
|
|
|
import LinkedIn (run)
|
|
import LinkedIn (run)
|
|
|
import LinkedIn.Output.Types (Output)
|
|
import LinkedIn.Output.Types (Output)
|
|
@@ -12,9 +14,10 @@ import LinkedIn.PageUrl (PageUrl(..))
|
|
|
import Type.Proxy (Proxy(..))
|
|
import Type.Proxy (Proxy(..))
|
|
|
import Web.DOM (Document)
|
|
import Web.DOM (Document)
|
|
|
|
|
|
|
|
-toOutput ∷ Partial ⇒ PageUrl → Document → Effect (Either String Output)
|
|
|
|
|
|
|
+toOutput ∷ PageUrl → Document → Effect (Either String Output)
|
|
|
toOutput ctx dom = case ctx of
|
|
toOutput ctx dom = case ctx of
|
|
|
UrlProjects _ -> run (Proxy :: Proxy ProjectsPage) dom
|
|
UrlProjects _ -> run (Proxy :: Proxy ProjectsPage) dom
|
|
|
UrlSkills _ -> run (Proxy :: Proxy SkillsPage) dom
|
|
UrlSkills _ -> run (Proxy :: Proxy SkillsPage) dom
|
|
|
UrlWorkExperience _ -> run (Proxy :: Proxy WorkExperiencesPage) dom
|
|
UrlWorkExperience _ -> run (Proxy :: Proxy WorkExperiencesPage) dom
|
|
|
UrlJobOffer _ -> run (Proxy :: Proxy JobOfferPage) dom
|
|
UrlJobOffer _ -> run (Proxy :: Proxy JobOfferPage) dom
|
|
|
|
|
+ _ -> pure $ Left "Not handled yet"
|