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
246ab19a
Unverified
Commit
246ab19a
authored
Sep 04, 2018
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main: restore the routing, componentWillMount is now called unsafeComponentWillMount
parent
8ab40841
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Main.purs
src/Main.purs
+4
-4
No files found.
src/Main.purs
View file @
246ab19a
...
@@ -19,8 +19,8 @@ import Web.HTML (window)
...
@@ -19,8 +19,8 @@ import Web.HTML (window)
import Web.HTML.Window (document)
import Web.HTML.Window (document)
import Web.HTML.HTMLDocument (toParentNode)
import Web.HTML.HTMLDocument (toParentNode)
set
ComponentWillMount :: forall s. Effect Unit -> Record s -> Record (c
omponentWillMount :: Effect Unit | s)
set
UnsafeComponentWillMount :: forall s. Effect Unit -> Record s -> Record (unsafeC
omponentWillMount :: Effect Unit | s)
set
ComponentWillMount = unsafeSet "c
omponentWillMount"
set
UnsafeComponentWillMount = unsafeSet "unsafeC
omponentWillMount"
main :: Effect Unit
main :: Effect Unit
main = do
main = do
...
@@ -28,7 +28,7 @@ main = do
...
@@ -28,7 +28,7 @@ main = do
{ spec, dispatcher } -> void $ do
{ spec, dispatcher } -> void $ do
let setRouting this = void $ do
let setRouting this = void $ do
matches routing (routeHandler (dispatchAction (dispatcher this)))
matches routing (routeHandler (dispatchAction (dispatcher this)))
spec' this = setComponentWillMount (setRouting this) <$> (spec this)
spec' this = set
Unsafe
ComponentWillMount (setRouting this) <$> (spec this)
document <- window >>= document
document <- window >>= document
container <- unsafePartial (fromJust <$> querySelector (QuerySelector "#app") (toParentNode document))
container <- unsafePartial (fromJust <$> querySelector (QuerySelector "#app") (toParentNode document))
h <- getHash
h <- getHash
...
@@ -37,5 +37,5 @@ main = do
...
@@ -37,5 +37,5 @@ main = do
_ -> do
_ -> do
setHash "/"
setHash "/"
setHash h
setHash h
let e = R.unsafeCreateElement (R.component "GargantextMain" spec) {} []
let e = R.unsafeCreateElement (R.component "GargantextMain" spec
'
) {} []
RDOM.render e container
RDOM.render e container
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