Commit 0a56148e authored by Karen Konou's avatar Karen Konou

[Tree] Pinning debug

parent 3aef984f
Pipeline #3840 failed with stage
in 0 seconds
...@@ -5,10 +5,11 @@ module Gargantext.Components.Forest.Tree.Node ...@@ -5,10 +5,11 @@ module Gargantext.Components.Forest.Tree.Node
import Gargantext.Prelude import Gargantext.Prelude
import DOM.Simple.Console (log2)
import Data.Array.NonEmpty as NArray import Data.Array.NonEmpty as NArray
import Data.Foldable (intercalate) import Data.Foldable (intercalate)
import Data.Maybe (Maybe(..), maybe)
import Data.Map as Map import Data.Map as Map
import Data.Maybe (Maybe(..), maybe)
import Data.String.Regex as Regex import Data.String.Regex as Regex
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
import Effect (Effect) import Effect (Effect)
...@@ -305,7 +306,9 @@ nodeSpanCpt = here.component "nodeSpan" cpt ...@@ -305,7 +306,9 @@ nodeSpanCpt = here.component "nodeSpan" cpt
B.iconButton B.iconButton
{ name: "anchor" { name: "anchor"
, className: "mainleaf__pin-icon" , className: "mainleaf__pin-icon"
, callback: \_ -> T.modify_ (Map.insert (show session) id) boxes.pinnedTreeId , callback: \_ -> do
log2 "[Pinning tree ID]" id
T.modify_ (Map.insert (show session) id) boxes.pinnedTreeId
, title: "Pin the tree to this node" , title: "Pin the tree to this node"
, variant: Secondary , variant: Secondary
, elevation: Level1 , elevation: Level1
......
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