Browse Source

Removed href attribute from anchor tag if deeplinking is disabled

bubble
Surya 7 years ago
parent
commit
f7efd58305
2 changed files with 24 additions and 12 deletions
  1. +12
    -6
      src/core/components/operation.jsx
  2. +12
    -6
      src/core/components/operations.jsx

+ 12
- 6
src/core/components/operation.jsx View File

@@ -161,12 +161,18 @@ export default class Operation extends PureComponent {
<div className={`opblock-summary opblock-summary-${method}`} onClick={this.toggleShown} >
<span className="opblock-summary-method">{method.toUpperCase()}</span>
<span className={ deprecated ? "opblock-summary-path__deprecated" : "opblock-summary-path" } >
<a
className="nostyle"
onClick={(e) => e.preventDefault()}
href={ isDeepLinkingEnabled ? `#/${isShownKey[1]}/${isShownKey[2]}` : ""} >
<span>{path}</span>
</a>
{
isDeepLinkingEnabled ?
<a
className="nostyle"
onClick={(e) => e.preventDefault()}
href={`#/${isShownKey[1]}/${isShownKey[2]}`}>
<span>{path}</span>
</a> :
<a className="nostyle">
<span>{path}</span>
</a>
}
<JumpToPath path={jumpToKey} />
</span>



+ 12
- 6
src/core/components/operations.jsx View File

@@ -79,12 +79,18 @@ export default class Operations extends React.Component {
onClick={() => layoutActions.show(isShownKey, !showTag)}
className={!tagDescription ? "opblock-tag no-desc" : "opblock-tag" }
id={isShownKey.join("-")}>
<a
className="nostyle"
onClick={(e) => e.preventDefault()}
href={ isDeepLinkingEnabled ? `#/${tag}` : ""}>
<span>{tag}</span>
</a>
{
isDeepLinkingEnabled ?
<a
className="nostyle"
onClick={(e) => e.preventDefault()}
href= {`#/${tag}`}>
<span>{tag}</span>
</a>:
<a className="nostyle">
<span>{tag}</span>
</a>
}
{ !tagDescription ? null :
<small>
{ tagDescription }


Loading…
Cancel
Save