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
This commit is contained in:
@@ -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',
|
||||
|
Reference in New Issue
Block a user