aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-28 23:04:02 +0800
committerFabio Berger <me@fabioberger.com>2018-08-28 23:04:02 +0800
commit4a524a5f275b80d2e5122ee8a055cf4cc737e32c (patch)
tree6df0c8aab5f8c28145628a98b50909b9cbab0395 /packages/website
parentee1e50a7225882bb0c97408100c85a199611fadb (diff)
parent9fd46c790097a64c29df816abf83a05cb6acccee (diff)
downloaddexon-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')
-rw-r--r--packages/website/package.json2
-rw-r--r--packages/website/ts/components/dropdowns/developers_drop_down.tsx18
2 files changed, 8 insertions, 12 deletions
diff --git a/packages/website/package.json b/packages/website/package.json
index 9b6a0ba36..0a223bcb2 100644
--- a/packages/website/package.json
+++ b/packages/website/package.json
@@ -21,7 +21,7 @@
"@0xproject/contract-wrappers": "^0.0.5",
"@0xproject/order-utils": "^0.0.9",
"@0xproject/react-docs": "^1.0.7",
- "@0xproject/react-shared": "^0.2.3",
+ "@0xproject/react-shared": "^1.0.8",
"@0xproject/subproviders": "^2.0.1",
"@0xproject/types": "^0.8.1",
"@0xproject/typescript-typings": "^0.4.3",
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',