From 07de3a1d94e360cada1c5fc5754014e596865b55 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 20 Mar 2018 15:39:32 +0000 Subject: Pass actual iconUrl and add default icon image --- packages/website/ts/components/sidebar_header.tsx | 2 +- packages/website/ts/pages/documentation/doc_page.tsx | 9 +++------ packages/website/ts/pages/wiki/wiki.tsx | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'packages/website/ts') diff --git a/packages/website/ts/components/sidebar_header.tsx b/packages/website/ts/components/sidebar_header.tsx index 51e8a59d5..a0ea869fb 100644 --- a/packages/website/ts/components/sidebar_header.tsx +++ b/packages/website/ts/components/sidebar_header.tsx @@ -26,7 +26,7 @@ export class SidebarHeader extends React.Component
- +
{this.props.title} 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 { ? {} : 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 (
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 { ...styles.mainContainers, overflow: this.state.isHoveringSidebar ? 'auto' : 'hidden', }; - const sidebarHeader = ; + const sidebarHeader = ; return (
-- cgit v1.2.3