Main.purs 556 Bytes
Newer Older
1
module Main (main) where
Abinaya Sudhir's avatar
Abinaya Sudhir committed
2

James Laver's avatar
James Laver committed
3 4 5
import Prelude (Unit, ($))
import Data.Maybe (Maybe(..))
import Data.Nullable (toMaybe)
6
import DOM.Simple (Element)
James Laver's avatar
James Laver committed
7 8
import DOM.Simple.Document (document)
import DOM.Simple.Console (log)
Sudhir Kumar's avatar
Sudhir Kumar committed
9
import Effect (Effect)
James Laver's avatar
James Laver committed
10
import FFI.Simple ((...))
11

12
import Gargantext.Components.App (app)
13
import Gargantext.Utils.Reactix as R2
Abinaya Sudhir's avatar
Abinaya Sudhir committed
14

15
main :: Effect Unit
16 17 18 19
main = paint $ toMaybe (document ... "getElementById" $ [ "app" ])

paint :: Maybe Element -> Effect Unit
paint Nothing = log "[main] Container not found"
20
paint (Just c) = R2.render (app {} []) c