Commit 810b18e1 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[graph] fix spinner for graph loading

parent c96a6996
......@@ -148,7 +148,11 @@ forestLayoutMainCpt = R2.hooksComponent thisModule "forestLayoutMain" cpt
-- Simple layout does not accommodate the tree
simpleLayout :: R.State GT.Handed -> R.Element -> R.Element
simpleLayout handed child = R.fragment [ topBar { handed }, child, license]
simpleLayout handed child = H.div { className: "simple-layout" } [
topBar { handed }
, child
, license
]
mainPage :: R.Element -> R.Element
mainPage child =
......
......@@ -37,6 +37,7 @@ import Gargantext.Types as Types
import Gargantext.Utils.Range as Range
import Gargantext.Utils.Reactix as R2
thisModule :: String
thisModule = "Gargantext.Components.GraphExplorer"
type LayoutProps =
......@@ -79,7 +80,7 @@ explorerLayoutView graphVersion p = R.createElement el p []
explorer (Record.merge props { graph, graphVersion, hyperdataGraph: loaded, mMetaData })
where
GET.HyperdataGraph { graph: hyperdataGraph } = loaded
(Tuple mMetaData graph) = convert hyperdataGraph
Tuple mMetaData graph = convert hyperdataGraph
--------------------------------------------------------------
explorer :: Record Props -> R.Element
......
......@@ -3,15 +3,20 @@ module Gargantext.Components.LoadingSpinner where
import Reactix as R
import Reactix.DOM.HTML as H
import Gargantext.Utils.Reactix as R2
thisModule :: String
thisModule = "Gargantext.Components.LoadingSpinner"
type Props = ()
loadingSpinner :: Record Props -> R.Element
loadingSpinner props = R.createElement loadingSpinnerCpt props []
loadingSpinnerCpt :: R.Component Props
loadingSpinnerCpt = R.staticComponent "LoadingSpinner" cpt
loadingSpinnerCpt = R2.staticComponent thisModule "LoadingSpinner" cpt
where
cpt _ _ = H.i {className: "fa fa-smile-o fa-spin fa-3x fa-fw"} [H.text ""]
cpt _ _ = H.i {className: "spinner fa fa-smile-o fa-spin fa-3x fa-fw"} [H.text ""]
-- cpt _ _ = H.i {className: "fa fa-globe fa-spin fa-3x fa-fw"} [H.text ""]
-- cpt _ _ = H.i {className: "fa fa-circle-o-notch fa-spin fa-3x fa-fw"} [H.text ""]
......
......@@ -48,6 +48,11 @@ type HooksComponent props = Record props -> Array R.Element -> R.Hooks R.Element
hooksComponent :: forall props. String -> String -> HooksComponent props -> R.Component props
hooksComponent module' name c = R.hooksComponent (module' <> "." <> name) c
type StaticComponent props = Record props -> Array R.Element -> R.Element
staticComponent :: forall props. String -> String -> StaticComponent props -> R.Component props
staticComponent module' name c = R.staticComponent (module' <> "." <> name) c
newtype Point = Point { x :: Number, y :: Number }
-- a setter function, for useState
......
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