aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/footer.tsx
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/footer.tsx
parent5f2cd33da07a7acc65f2e05acb35755f74af75a4 (diff)
downloaddexon-sol-tools-fa6bd348992674192d07fef3d60950980212ecbb.tar.gz
dexon-sol-tools-fa6bd348992674192d07fef3d60950980212ecbb.tar.zst
dexon-sol-tools-fa6bd348992674192d07fef3d60950980212ecbb.zip
Remove type prop and instead infer it from the value of to
Diffstat (limited to 'packages/website/ts/components/footer.tsx')
-rw-r--r--packages/website/ts/components/footer.tsx23
1 files changed, 14 insertions, 9 deletions
diff --git a/packages/website/ts/components/footer.tsx b/packages/website/ts/components/footer.tsx
index d90f2f708..f11ecae19 100644
--- a/packages/website/ts/components/footer.tsx
+++ b/packages/website/ts/components/footer.tsx
@@ -1,4 +1,4 @@
-import { ALink, colors, Link, LinkType } from '@0xproject/react-shared';
+import { ALink, colors, Link } from '@0xproject/react-shared';
import { ObjectMap } from '@0xproject/types';
import * as _ from 'lodash';
import DropDownMenu from 'material-ui/DropDownMenu';
@@ -54,7 +54,7 @@ export class Footer extends React.Component<FooterProps, FooterState> {
{
title: this.props.translate.get(Key.Whitepaper, Deco.Cap),
to: WebsitePaths.Whitepaper,
- type: LinkType.External,
+ shouldOpenInNewTab: true,
},
{
title: this.props.translate.get(Key.Wiki, Deco.Cap),
@@ -68,28 +68,28 @@ export class Footer extends React.Component<FooterProps, FooterState> {
[Key.Community]: [
{
title: this.props.translate.get(Key.RocketChat, Deco.Cap),
- type: LinkType.External,
to: constants.URL_ZEROEX_CHAT,
+ shouldOpenInNewTab: true,
},
{
title: this.props.translate.get(Key.Blog, Deco.Cap),
- type: LinkType.External,
to: constants.URL_BLOG,
+ shouldOpenInNewTab: true,
},
{
title: 'Twitter',
- type: LinkType.External,
to: constants.URL_TWITTER,
+ shouldOpenInNewTab: true,
},
{
title: 'Reddit',
- type: LinkType.External,
to: constants.URL_REDDIT,
+ shouldOpenInNewTab: true,
},
{
title: this.props.translate.get(Key.Forum, Deco.Cap),
- type: LinkType.External,
to: constants.URL_DISCOURSE_FORUM,
+ shouldOpenInNewTab: true,
},
],
[Key.Organization]: [
@@ -103,8 +103,8 @@ export class Footer extends React.Component<FooterProps, FooterState> {
},
{
title: this.props.translate.get(Key.Contact, Deco.Cap),
- type: LinkType.External,
to: 'mailto:team@0xproject.com',
+ shouldOpenInNewTab: true,
},
],
};
@@ -182,7 +182,12 @@ export class Footer extends React.Component<FooterProps, FooterState> {
const iconIfExists = titleToIcon[link.title];
return (
<div key={link.title} className="sm-center" style={{ fontSize: 13, paddingTop: 25 }}>
- <Link to={link.to} type={link.type} fontColor={colors.white} className="text-decoration-none">
+ <Link
+ to={link.to}
+ shouldOpenInNewTab={link.shouldOpenInNewTab}
+ fontColor={colors.white}
+ className="text-decoration-none"
+ >
<div>
{!_.isUndefined(iconIfExists) ? (
<div className="inline-block">