aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/dropdowns
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-05 21:55:28 +0800
committerFabio Berger <me@fabioberger.com>2018-10-05 21:55:28 +0800
commitfa6bd348992674192d07fef3d60950980212ecbb (patch)
tree7b8fb8323c972291ddb1c77bc45f73bf39a8f805 /packages/website/ts/components/dropdowns
parent5f2cd33da07a7acc65f2e05acb35755f74af75a4 (diff)
downloaddexon-0x-contracts-fa6bd348992674192d07fef3d60950980212ecbb.tar.gz
dexon-0x-contracts-fa6bd348992674192d07fef3d60950980212ecbb.tar.zst
dexon-0x-contracts-fa6bd348992674192d07fef3d60950980212ecbb.zip
Remove type prop and instead infer it from the value of to
Diffstat (limited to 'packages/website/ts/components/dropdowns')
-rw-r--r--packages/website/ts/components/dropdowns/developers_drop_down.tsx10
1 files changed, 3 insertions, 7 deletions
diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx
index e3039420e..8a5ad53e2 100644
--- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx
+++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx
@@ -1,4 +1,4 @@
-import { ALink, colors, Link, LinkType } from '@0xproject/react-shared';
+import { ALink, colors, Link } from '@0xproject/react-shared';
import * as _ from 'lodash';
import * as React from 'react';
import { Container } from 'ts/components/ui/container';
@@ -46,19 +46,16 @@ const usefulLinksToLinkInfo: ALink[] = [
{
title: Key.Github,
to: constants.URL_GITHUB_ORG,
- type: LinkType.External,
shouldOpenInNewTab: true,
},
{
title: Key.Whitepaper,
to: WebsitePaths.Whitepaper,
- type: LinkType.External,
shouldOpenInNewTab: true,
},
{
title: Key.Sandbox,
to: constants.URL_SANDBOX,
- type: LinkType.External,
shouldOpenInNewTab: true,
},
];
@@ -160,17 +157,16 @@ export class DevelopersDropDown extends React.Component<DevelopersDropDownProps,
const isWikiLink = _.startsWith(link.to, WebsitePaths.Wiki) && _.includes(link.to, '#');
const isOnWiki = this.props.location.pathname === WebsitePaths.Wiki;
let to = link.to;
- let type = link.type;
+ const type = link.type;
if (isWikiLink && isOnWiki) {
to = `${link.to.split('#')[1]}`;
- type = LinkType.ReactScroll;
}
i++;
const isLast = i === numLinks;
const linkText = this.props.translate.get(link.title as Key, Deco.Cap);
return (
<div className={`pr1 pt1 ${!isLast && 'pb1'}`} key={`dev-dropdown-link-${link.title}`}>
- <Link to={to} type={type} shouldOpenInNewTab={!!link.shouldOpenInNewTab}>
+ <Link to={to} shouldOpenInNewTab={!!link.shouldOpenInNewTab}>
<Text fontFamily="Roboto, Roboto Mono" fontColor={colors.lightBlueA700}>
{linkText}
</Text>