Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-web
ensembl-client
Commits
cf8cbc92
Unverified
Commit
cf8cbc92
authored
Aug 28, 2019
by
Andrey Azov
Committed by
GitHub
Aug 28, 2019
Browse files
Remove condition upon environment from ZmenuContend (when showing links) (#150)
parent
b4fc297d
Pipeline
#32573
passed with stages
in 4 minutes and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
src/ensembl/src/content/app/browser/zmenu/ZmenuContent.tsx
src/ensembl/src/content/app/browser/zmenu/ZmenuContent.tsx
+2
-9
No files found.
src/ensembl/src/content/app/browser/zmenu/ZmenuContent.tsx
View file @
cf8cbc92
...
...
@@ -2,8 +2,6 @@ import React from 'react';
import
classNames
from
'
classnames
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
isEnvironment
,
Environment
}
from
'
src/shared/helpers/environment
'
;
import
{
changeFocusObject
}
from
'
src/content/app/browser/browserActions
'
;
import
styles
from
'
./Zmenu.scss
'
;
...
...
@@ -85,16 +83,11 @@ const ZmenuContentBlock = (props: ZmenuContentBlockProps) => {
const
ZmenuContentItem
=
(
props
:
ZmenuContentItemProps
)
=>
{
const
{
text
,
markup
,
id
}
=
props
;
// FIXME: remove dependency on environment when ensObject api endpoint is ready
const
shouldAddLink
=
markup
.
includes
(
Markup
.
FOCUS
)
&&
isEnvironment
([
Environment
.
DEVELOPMENT
,
Environment
.
INTERNAL
]);
const
className
=
classNames
({
[
styles
.
markupLight
]:
markup
.
includes
(
Markup
.
LIGHT
),
[
styles
.
markupStrong
]:
markup
.
includes
(
Markup
.
STRONG
),
[
styles
.
markupEmphasis
]:
markup
.
includes
(
Markup
.
EMPHASIS
),
[
styles
.
markupFocus
]:
shouldAddLink
[
styles
.
markupFocus
]:
markup
.
includes
(
Markup
.
FOCUS
)
});
const
handleClick
=
()
=>
{
...
...
@@ -103,7 +96,7 @@ const ZmenuContentItem = (props: ZmenuContentItemProps) => {
const
itemProps
=
{
className
,
onClick
:
shouldAddLink
?
handleClick
:
undefined
onClick
:
handleClick
};
return
<
span
{
...
itemProps
}
>
{
text
}
</
span
>;
...
...
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