diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-03 21:26:30 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-03 21:26:30 +0800 |
commit | 6d8427a024d0175c4e0305503321b4169ff9ce05 (patch) | |
tree | 9e8bb1e2362d290280cabc4f787d5f48f3061bd9 /packages/website/ts/components/ui | |
parent | 80a6e6fe8dce9daeb69f0fd7529062780a58d5be (diff) | |
download | dexon-sol-tools-6d8427a024d0175c4e0305503321b4169ff9ce05.tar dexon-sol-tools-6d8427a024d0175c4e0305503321b4169ff9ce05.tar.gz dexon-sol-tools-6d8427a024d0175c4e0305503321b4169ff9ce05.tar.bz2 dexon-sol-tools-6d8427a024d0175c4e0305503321b4169ff9ce05.tar.lz dexon-sol-tools-6d8427a024d0175c4e0305503321b4169ff9ce05.tar.xz dexon-sol-tools-6d8427a024d0175c4e0305503321b4169ff9ce05.tar.zst dexon-sol-tools-6d8427a024d0175c4e0305503321b4169ff9ce05.zip |
Don't make opening links in new tab a default
Diffstat (limited to 'packages/website/ts/components/ui')
-rw-r--r-- | packages/website/ts/components/ui/link.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/website/ts/components/ui/link.tsx b/packages/website/ts/components/ui/link.tsx index 30c76e3c9..f8522ca2b 100644 --- a/packages/website/ts/components/ui/link.tsx +++ b/packages/website/ts/components/ui/link.tsx @@ -39,7 +39,7 @@ export const Link: React.StatelessComponent<LinkProps> = ({ case LinkType.External: return ( <a - target={shouldOpenInNewTab && '_blank'} + target={shouldOpenInNewTab ? '_blank' : ''} className={className} style={styleWithDefault} href={to} @@ -51,12 +51,15 @@ export const Link: React.StatelessComponent<LinkProps> = ({ </a> ); case LinkType.ReactRoute: + if (to === '/') { + console.log('got here!'); + } return ( <ReactRounterLink to={to} className={className} style={styleWithDefault} - target={shouldOpenInNewTab && '_blank'} + target={shouldOpenInNewTab ? '_blank' : ''} onMouseOver={onMouseOver} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave} @@ -73,7 +76,7 @@ export const Link: React.StatelessComponent<LinkProps> = ({ Link.defaultProps = { type: LinkType.ReactRoute, - shouldOpenInNewTab: true, + shouldOpenInNewTab: false, style: {}, className: '', onMouseOver: _.noop.bind(_), |