Commit 8e545c16 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] Typo and Type name.

parent cb39fda6
...@@ -62,16 +62,16 @@ _tablens :: Lens' State Tab.State ...@@ -62,16 +62,16 @@ _tablens :: Lens' State Tab.State
_tablens = lens (\s -> s.activeTab) (\s ss -> s {activeTab = ss}) _tablens = lens (\s -> s.activeTab) (\s ss -> s {activeTab = ss})
------------------------------------------------------------------------ ------------------------------------------------------------------------
data Action = Load Int data Action = Load Int
| DocviewAction D.Action | DocviewA D.Action
| AuthorviewA A.Action | AuthorviewA A.Action
| SourceviewA S.Action | SourceviewA S.Action
| TermsviewA T.Action | TermsviewA T.Action
| TabViewA Tab.Action | TabViewA Tab.Action
_docAction :: Prism' Action D.Action _docAction :: Prism' Action D.Action
_docAction = prism DocviewAction \ action -> _docAction = prism DocviewA \ action ->
case action of case action of
DocviewAction laction -> Right laction DocviewA laction -> Right laction
_-> Left action _-> Left action
_authorAction :: Prism' Action A.Action _authorAction :: Prism' Action A.Action
...@@ -215,11 +215,11 @@ performAction (Load nId) _ _ = do ...@@ -215,11 +215,11 @@ performAction (Load nId) _ _ = do
(Left err) -> do (Left err) -> do
logs err logs err
logs $ "Node Corpus fetched." logs $ "Node Corpus fetched."
performAction (DocviewAction a) _ _ = pure unit performAction (DocviewA _) _ _ = pure unit
performAction (AuthorviewA _) _ _ = pure unit performAction (AuthorviewA _) _ _ = pure unit
performAction (SourceviewA _) _ _ = pure unit performAction (SourceviewA _) _ _ = pure unit
performAction (TabViewA _) _ _ = pure unit performAction (TabViewA _) _ _ = pure unit
performAction (TermsviewA _) _ _ = pure unit performAction (TermsviewA _) _ _ = pure unit
getNode :: Int -> Aff (Either String (NodePoly CorpusInfo)) getNode :: Int -> Aff (Either String (NodePoly CorpusInfo))
getNode id = get $ toUrl Back Node id getNode id = get $ toUrl Back Node id
...@@ -229,10 +229,10 @@ getNode id = get $ toUrl Back Node id ...@@ -229,10 +229,10 @@ getNode id = get $ toUrl Back Node id
------------------------------------------------------------------------ ------------------------------------------------------------------------
facets :: Spec State {} Action facets :: Spec State {} Action
facets = facets =
Tab.tabs _tablens _tabAction $ fromFoldable [ Tuple "Doc View" docPageSpec Tab.tabs _tablens _tabAction $ fromFoldable [ Tuple "Documents" docPageSpec
, Tuple "Author View" authorPageSpec , Tuple "Authors" authorPageSpec
, Tuple "Source View" sourcePageSpec , Tuple "Sources" sourcePageSpec
, Tuple "Terms View" termsPageSpec , Tuple "Terms" termsPageSpec
] ]
docPageSpec :: Spec State {} Action docPageSpec :: Spec State {} Action
......
...@@ -43,7 +43,7 @@ dispatchAction dispatcher _ (DocView n) = do ...@@ -43,7 +43,7 @@ dispatchAction dispatcher _ (DocView n) = do
dispatchAction dispatcher _ (Corpus n) = do dispatchAction dispatcher _ (Corpus n) = do
dispatcher $ SetRoute $ Corpus n dispatcher $ SetRoute $ Corpus n
dispatcher $ CorpusAction $ Corpus.Load n dispatcher $ CorpusAction $ Corpus.Load n
dispatcher $ CorpusAction $ Corpus.DocviewAction $ D.LoadData n dispatcher $ CorpusAction $ Corpus.DocviewA $ D.LoadData n
dispatchAction dispatcher _ SearchView = do dispatchAction dispatcher _ SearchView = do
dispatcher $ SetRoute SearchView dispatcher $ SetRoute SearchView
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment