diff options
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', |