aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-20 23:39:32 +0800
committerFabio Berger <me@fabioberger.com>2018-03-20 23:39:32 +0800
commit07de3a1d94e360cada1c5fc5754014e596865b55 (patch)
tree676846379018b447b301aaef13ca09e77c7368db /packages/website/ts/pages
parent27880a6059f282cdee833523a6144bcafa8c266b (diff)
downloaddexon-0x-contracts-07de3a1d94e360cada1c5fc5754014e596865b55.tar
dexon-0x-contracts-07de3a1d94e360cada1c5fc5754014e596865b55.tar.gz
dexon-0x-contracts-07de3a1d94e360cada1c5fc5754014e596865b55.tar.bz2
dexon-0x-contracts-07de3a1d94e360cada1c5fc5754014e596865b55.tar.lz
dexon-0x-contracts-07de3a1d94e360cada1c5fc5754014e596865b55.tar.xz
dexon-0x-contracts-07de3a1d94e360cada1c5fc5754014e596865b55.tar.zst
dexon-0x-contracts-07de3a1d94e360cada1c5fc5754014e596865b55.zip
Pass actual iconUrl and add default icon image
Diffstat (limited to 'packages/website/ts/pages')
-rw-r--r--packages/website/ts/pages/documentation/doc_page.tsx9
-rw-r--r--packages/website/ts/pages/wiki/wiki.tsx2
2 files changed, 4 insertions, 7 deletions
diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx
index 26a80c745..e2fcca084 100644
--- a/packages/website/ts/pages/documentation/doc_page.tsx
+++ b/packages/website/ts/pages/documentation/doc_page.tsx
@@ -16,15 +16,11 @@ import { Translate } from 'ts/utils/translate';
import { utils } from 'ts/utils/utils';
const isDevelopment = configs.ENVIRONMENT === Environments.DEVELOPMENT;
+const DEFAULT_ICON = 'zeroExJs.png';
const ZERO_EX_JS_VERSION_MISSING_TOPLEVEL_PATH = '0.32.4';
const idToIcon: { [id: string]: string } = {
[DocPackages.ZeroExJs]: 'zeroExJs.png',
- [DocPackages.Web3Wrapper]: 'zeroExJs.png',
- [DocPackages.Deployer]: 'zeroExJs.png',
- [DocPackages.SolCov]: 'zeroExJs.png',
- [DocPackages.JSONSchemas]: 'zeroExJs.png',
- [DocPackages.Subproviders]: 'zeroExJs.png',
[DocPackages.Connect]: 'connect.png',
[DocPackages.SmartContracts]: 'contracts.png',
};
@@ -79,7 +75,8 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> {
? {}
: this.props.docsInfo.getMenuSubsectionsBySection(this.state.docAgnosticFormat);
const sourceUrl = this._getSourceUrl();
- const iconUrl = idToIcon[this.props.docsInfo.id];
+ const iconFileName = idToIcon[this.props.docsInfo.id] || DEFAULT_ICON;
+ const iconUrl = `/images/doc_icons/${iconFileName}`;
return (
<div>
<DocumentTitle title={`${this.props.docsInfo.displayName} Documentation`} />
diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx
index a8d70029c..23d1b52fb 100644
--- a/packages/website/ts/pages/wiki/wiki.tsx
+++ b/packages/website/ts/pages/wiki/wiki.tsx
@@ -88,7 +88,7 @@ export class Wiki extends React.Component<WikiProps, WikiState> {
...styles.mainContainers,
overflow: this.state.isHoveringSidebar ? 'auto' : 'hidden',
};
- const sidebarHeader = <SidebarHeader title="Wiki" iconUrl="wiki.png" />;
+ const sidebarHeader = <SidebarHeader title="Wiki" iconUrl="/images/doc_icons/wiki.png" />;
return (
<div>
<DocumentTitle title="0x Protocol Wiki" />