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
138
Issues
138
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
gargantext
purescript-gargantext
Commits
62d5ff14
Commit
62d5ff14
authored
May 22, 2025
by
Yoelis Acourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add helper hide function
parent
dc896c1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
UseFeatureFlag.purs
src/Gargantext/Hooks/UseFeatureFlag.purs
+7
-0
No files found.
src/Gargantext/Hooks/UseFeatureFlag.purs
View file @
62d5ff14
...
@@ -53,6 +53,13 @@ feature = R2.renderLeaf "" $
...
@@ -53,6 +53,13 @@ feature = R2.renderLeaf "" $
render shouldRender
render shouldRender
)
)
hide = R2.renderLeaf "" $
( \{ keys, render } _ -> do
shouldRender <- useFeatureFlag keys
pure $
if shouldRender then render else H.text ""
)
hideBehind :: forall a. Array String -> R2.Component a -> R2.Component a
hideBehind :: forall a. Array String -> R2.Component a -> R2.Component a
hideBehind keys cpt = R2.renderComponent "" \props children -> do
hideBehind keys cpt = R2.renderComponent "" \props children -> do
shouldRender <- useFeatureFlag keys
shouldRender <- useFeatureFlag keys
...
...
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