Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
84bbe044
Unverified
Commit
84bbe044
authored
Sep 20, 2018
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No state for publicationSpec
parent
ec64201f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
30 deletions
+6
-30
Documents.purs
src/Gargantext/Pages/Corpus/User/Users/Specs/Documents.purs
+4
-16
Lens.purs
src/Gargantext/Pages/Corpus/User/Users/Types/Lens.purs
+2
-11
States.purs
src/Gargantext/Pages/Corpus/User/Users/Types/States.purs
+0
-3
No files found.
src/Gargantext/Pages/Corpus/User/Users/Specs/Documents.purs
View file @
84bbe044
...
@@ -3,24 +3,12 @@ module Gargantext.Pages.Corpus.User.Users.Specs.Documents where
...
@@ -3,24 +3,12 @@ module Gargantext.Pages.Corpus.User.Users.Specs.Documents where
import Prelude
import Prelude
import React.DOM (table, tbody, td, text, th, thead, tr)
import React.DOM (table, tbody, td, text, th, thead, tr)
import React.DOM.Props (className, scope)
import React.DOM.Props (className, scope)
import Thermite (
PerformAction, Render, Spec, modifyState
, simpleSpec)
import Thermite (
Render, Spec, defaultPerformAction
, simpleSpec)
publicationSpec :: Spec {} {} Void
type State = String
publicationSpec = simpleSpec defaultPerformAction render
initialState :: State
initialState = ""
data Action = NoOp
performAction :: PerformAction State {} Action
performAction NoOp _ _ = void do
modifyState identity
publicationSpec :: Spec State {} Action
publicationSpec = simpleSpec performAction render
where
where
render :: Render
State {} Action
render :: Render
{} {} Void
render dispatch _ state _ =
render dispatch _ state _ =
[ table [ className "table"]
[ table [ className "table"]
[ thead [ className "thead-dark"]
[ thead [ className "thead-dark"]
...
...
src/Gargantext/Pages/Corpus/User/Users/Types/Lens.purs
View file @
84bbe044
...
@@ -9,7 +9,7 @@ import Gargantext.Pages.Corpus.User.Users.Types.Types (User)
...
@@ -9,7 +9,7 @@ import Gargantext.Pages.Corpus.User.Users.Types.Types (User)
import Gargantext.Pages.Folder as PS
import Gargantext.Pages.Folder as PS
import Gargantext.Pages.Corpus.User.Users.Specs.Documents as P
import Gargantext.Pages.Corpus.User.Users.Specs.Documents as P
import Gargantext.Components.Tab as Tab
import Gargantext.Components.Tab as Tab
import Thermite (Spec,
focus
)
import Thermite (Spec,
noState
)
_user :: Lens' State (Maybe User)
_user :: Lens' State (Maybe User)
_user = lens (\s -> s.user) (\s ss -> s{user = ss})
_user = lens (\s -> s.user) (\s ss -> s{user = ss})
...
@@ -23,17 +23,8 @@ _tabAction = prism TabA \ action ->
...
@@ -23,17 +23,8 @@ _tabAction = prism TabA \ action ->
TabA laction -> Right laction
TabA laction -> Right laction
_-> Left action
_-> Left action
_publens :: Lens' State P.State
_publens = lens (\s -> s.publications) (\s ss -> s { publications= ss})
_pubAction :: Prism' Action P.Action
_pubAction = prism PublicationA \ action ->
case action of
PublicationA laction -> Right laction
_-> Left action
publicationSpec :: Spec State {} Action
publicationSpec :: Spec State {} Action
publicationSpec =
focus _publens _pubAction
P.publicationSpec
publicationSpec =
noState
P.publicationSpec
_projectslens :: Lens' State PS.State
_projectslens :: Lens' State PS.State
_projectslens = lens (\s -> s.projects) (\s ss -> s {projects = ss})
_projectslens = lens (\s -> s.projects) (\s ss -> s {projects = ss})
...
...
src/Gargantext/Pages/Corpus/User/Users/Types/States.purs
View file @
84bbe044
...
@@ -8,14 +8,12 @@ import Gargantext.Components.Tab as Tab
...
@@ -8,14 +8,12 @@ import Gargantext.Components.Tab as Tab
data Action
data Action
= NoOp
= NoOp
| PublicationA P.Action
| ProjectsA PS.Action
| ProjectsA PS.Action
| TabA Tab.Action
| TabA Tab.Action
| FetchUser Int
| FetchUser Int
type State =
type State =
{ activeTab :: Int
{ activeTab :: Int
, publications :: P.State
, projects :: PS.State
, projects :: PS.State
, user :: Maybe User
, user :: Maybe User
}
}
...
@@ -23,7 +21,6 @@ type State =
...
@@ -23,7 +21,6 @@ type State =
initialState :: State
initialState :: State
initialState =
initialState =
{ activeTab : 0
{ activeTab : 0
, publications : P.initialState
, projects : PS.initialState
, projects : PS.initialState
, user: Nothing
, user: Nothing
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment