From f7efd583059ed0be53ea757102d6c7adaaf140db Mon Sep 17 00:00:00 2001 From: Surya Date: Fri, 25 Aug 2017 23:08:56 +0530 Subject: [PATCH] Removed href attribute from anchor tag if deeplinking is disabled --- src/core/components/operation.jsx | 18 ++++++++++++------ src/core/components/operations.jsx | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/core/components/operation.jsx b/src/core/components/operation.jsx index b84b40c6..9f32303b 100644 --- a/src/core/components/operation.jsx +++ b/src/core/components/operation.jsx @@ -161,12 +161,18 @@ export default class Operation extends PureComponent {
{method.toUpperCase()} - e.preventDefault()} - href={ isDeepLinkingEnabled ? `#/${isShownKey[1]}/${isShownKey[2]}` : ""} > - {path} - + { + isDeepLinkingEnabled ? + e.preventDefault()} + href={`#/${isShownKey[1]}/${isShownKey[2]}`}> + {path} + : + + {path} + + } diff --git a/src/core/components/operations.jsx b/src/core/components/operations.jsx index ef1d4248..5610275d 100644 --- a/src/core/components/operations.jsx +++ b/src/core/components/operations.jsx @@ -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("-")}> - e.preventDefault()} - href={ isDeepLinkingEnabled ? `#/${tag}` : ""}> - {tag} - + { + isDeepLinkingEnabled ? + e.preventDefault()} + href= {`#/${tag}`}> + {tag} + : + + {tag} + + } { !tagDescription ? null : { tagDescription }