Pass actual iconUrl and add default icon image
This commit is contained in:
		@@ -26,7 +26,7 @@ export class SidebarHeader extends React.Component<SidebarHeaderProps, SidebarHe
 | 
			
		||||
                </div>
 | 
			
		||||
                <div className="flex">
 | 
			
		||||
                    <div>
 | 
			
		||||
                        <img src={`/images/doc_icons/${this.props.iconUrl}`} width="22" />
 | 
			
		||||
                        <img src={this.props.iconUrl} width="22" />
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div className="pl1" style={{ fontWeight: 600, fontSize: 20, lineHeight: 1.2 }}>
 | 
			
		||||
                        {this.props.title}
 | 
			
		||||
 
 | 
			
		||||
@@ -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`} />
 | 
			
		||||
 
 | 
			
		||||
@@ -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" />
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user