Refactor: use ternary operators at attribute level instead of element level
This commit is contained in:
@@ -161,18 +161,12 @@ export default class Operation extends PureComponent {
|
|||||||
<div className={`opblock-summary opblock-summary-${method}`} onClick={this.toggleShown} >
|
<div className={`opblock-summary opblock-summary-${method}`} onClick={this.toggleShown} >
|
||||||
<span className="opblock-summary-method">{method.toUpperCase()}</span>
|
<span className="opblock-summary-method">{method.toUpperCase()}</span>
|
||||||
<span className={ deprecated ? "opblock-summary-path__deprecated" : "opblock-summary-path" } >
|
<span className={ deprecated ? "opblock-summary-path__deprecated" : "opblock-summary-path" } >
|
||||||
{
|
<a
|
||||||
isDeepLinkingEnabled ?
|
className="nostyle"
|
||||||
<a
|
onClick={isDeepLinkingEnabled ? (e) => e.preventDefault() : null}
|
||||||
className="nostyle"
|
href={isDeepLinkingEnabled ? `#/${isShownKey[1]}/${isShownKey[2]}` : null}>
|
||||||
onClick={(e) => e.preventDefault()}
|
<span>{path}</span>
|
||||||
href={`#/${isShownKey[1]}/${isShownKey[2]}`}>
|
</a>
|
||||||
<span>{path}</span>
|
|
||||||
</a> :
|
|
||||||
<a className="nostyle">
|
|
||||||
<span>{path}</span>
|
|
||||||
</a>
|
|
||||||
}
|
|
||||||
<JumpToPath path={jumpToKey} />
|
<JumpToPath path={jumpToKey} />
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|||||||
@@ -79,18 +79,12 @@ export default class Operations extends React.Component {
|
|||||||
onClick={() => layoutActions.show(isShownKey, !showTag)}
|
onClick={() => layoutActions.show(isShownKey, !showTag)}
|
||||||
className={!tagDescription ? "opblock-tag no-desc" : "opblock-tag" }
|
className={!tagDescription ? "opblock-tag no-desc" : "opblock-tag" }
|
||||||
id={isShownKey.join("-")}>
|
id={isShownKey.join("-")}>
|
||||||
{
|
<a
|
||||||
isDeepLinkingEnabled ?
|
className="nostyle"
|
||||||
<a
|
onClick={isDeepLinkingEnabled ? (e) => e.preventDefault() : null}
|
||||||
className="nostyle"
|
href= {isDeepLinkingEnabled ? `#/${tag}` : null}>
|
||||||
onClick={(e) => e.preventDefault()}
|
<span>{tag}</span>
|
||||||
href= {`#/${tag}`}>
|
</a>
|
||||||
<span>{tag}</span>
|
|
||||||
</a>:
|
|
||||||
<a className="nostyle">
|
|
||||||
<span>{tag}</span>
|
|
||||||
</a>
|
|
||||||
}
|
|
||||||
{ !tagDescription ? null :
|
{ !tagDescription ? null :
|
||||||
<small>
|
<small>
|
||||||
{ tagDescription }
|
{ tagDescription }
|
||||||
|
|||||||
Reference in New Issue
Block a user