diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-28 23:04:02 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-28 23:04:02 +0800 |
commit | 4a524a5f275b80d2e5122ee8a055cf4cc737e32c (patch) | |
tree | 6df0c8aab5f8c28145628a98b50909b9cbab0395 /packages/website/ts/components | |
parent | ee1e50a7225882bb0c97408100c85a199611fadb (diff) | |
parent | 9fd46c790097a64c29df816abf83a05cb6acccee (diff) | |
download | dexon-sol-tools-4a524a5f275b80d2e5122ee8a055cf4cc737e32c.tar dexon-sol-tools-4a524a5f275b80d2e5122ee8a055cf4cc737e32c.tar.gz dexon-sol-tools-4a524a5f275b80d2e5122ee8a055cf4cc737e32c.tar.bz2 dexon-sol-tools-4a524a5f275b80d2e5122ee8a055cf4cc737e32c.tar.lz dexon-sol-tools-4a524a5f275b80d2e5122ee8a055cf4cc737e32c.tar.xz dexon-sol-tools-4a524a5f275b80d2e5122ee8a055cf4cc737e32c.tar.zst dexon-sol-tools-4a524a5f275b80d2e5122ee8a055cf4cc737e32c.zip |
Merge branch 'dev-dropdown' into doc-overview-page
* dev-dropdown:
Update to latest react-shared
Use translation helper
Use generatic ObjectMap type
fix(contracts): Catch cases where the actual error differs from the expected error (#1032)
Add clarifying comments
Remove redundant mstores from fillOrderNoThrow
fix(contracts): Use correct error message for division by zero
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r-- | packages/website/ts/components/dropdowns/developers_drop_down.tsx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index bf89775f7..7a0aea182 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -3,20 +3,16 @@ import * as _ from 'lodash'; import * as React from 'react'; import { Link } from 'react-router-dom'; import { DropDown } from 'ts/components/ui/drop_down'; -import { Deco, Key, WebsitePaths } from 'ts/types'; +import { Deco, Key, ObjectMap, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; -interface KeyToLinkInfo { - [key: string]: LinkInfo; -} - interface LinkInfo { link: string; shouldOpenNewTab: boolean; } -const gettingStartedKeyToLinkInfo1: KeyToLinkInfo = { +const gettingStartedKeyToLinkInfo1: ObjectMap<LinkInfo> = { [Key.BuildARelayer]: { link: `${WebsitePaths.Wiki}#Build-A-Relayer`, shouldOpenNewTab: false, @@ -26,7 +22,7 @@ const gettingStartedKeyToLinkInfo1: KeyToLinkInfo = { shouldOpenNewTab: false, }, }; -const gettingStartedKeyToLinkInfo2: KeyToLinkInfo = { +const gettingStartedKeyToLinkInfo2: ObjectMap<LinkInfo> = { [Key.TradingTutorial]: { link: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, shouldOpenNewTab: false, @@ -36,7 +32,7 @@ const gettingStartedKeyToLinkInfo2: KeyToLinkInfo = { shouldOpenNewTab: false, }, }; -const popularDocsToLinkInfos: KeyToLinkInfo = { +const popularDocsToLinkInfos: ObjectMap<LinkInfo> = { [Key.ZeroExJs]: { link: WebsitePaths.ZeroExJs, shouldOpenNewTab: false, @@ -50,7 +46,7 @@ const popularDocsToLinkInfos: KeyToLinkInfo = { shouldOpenNewTab: false, }, }; -const usefulLinksToLinkInfo: KeyToLinkInfo = { +const usefulLinksToLinkInfo: ObjectMap<LinkInfo> = { [Key.Github]: { link: constants.URL_GITHUB_ORG, shouldOpenNewTab: true, @@ -136,7 +132,7 @@ export class DevelopersDropDown extends React.Component<DevelopersDropDownProps, fontSize: 14, }} > - VIEW ALL DOCUMENTATION + {this.props.translate.get(Key.ViewAllDocumentation, Deco.Upper)} </Link> </div> </div> @@ -158,7 +154,7 @@ export class DevelopersDropDown extends React.Component<DevelopersDropDownProps, </div> ); } - private _renderLinkSection(keyToLinkInfo: KeyToLinkInfo): React.ReactNode { + private _renderLinkSection(keyToLinkInfo: ObjectMap<LinkInfo>): React.ReactNode { const linkStyle: React.CSSProperties = { color: colors.lightBlueA700, fontFamily: 'Roboto, Roboto Mono', |