From a4604cb2f294f08318aa432b233571ae4e205fd5 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 12 Oct 2018 19:44:18 +0100 Subject: Pass down sidebar instead of sectionNameToLinks --- .../website/ts/components/documentation/docs_top_bar.tsx | 11 +++-------- packages/website/ts/pages/documentation/developers_page.tsx | 12 ++++-------- packages/website/ts/pages/documentation/doc_page.tsx | 6 +++++- packages/website/ts/pages/documentation/docs_home.tsx | 7 +++++-- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 9a2146f9c..41273eb30 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -13,7 +13,7 @@ import { Translate } from 'ts/utils/translate'; export interface DocsTopBarProps { location: Location; translate: Translate; - sectionNameToLinks?: ObjectMap; + sidebar?: React.ReactNode; } interface DocsTopBarState { @@ -143,13 +143,8 @@ export class DocsTopBar extends React.Component - - + + {this.props.sidebar} ); diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 7172a7c66..c924fb460 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -1,5 +1,4 @@ -import { ALink, colors, constants as sharedConstants, NestedSidebarMenu } from '@0xproject/react-shared'; -import { ObjectMap } from '@0xproject/types'; +import { colors, constants as sharedConstants } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); @@ -21,7 +20,7 @@ export interface DevelopersPageProps { screenWidth: ScreenWidths; dispatcher: Dispatcher; mainContent: React.ReactNode; - sectionNameToLinks: ObjectMap; + sidebar: React.ReactNode; } export interface DevelopersPageState { @@ -107,10 +106,7 @@ export class DevelopersPage extends React.Component - + {this.props.sidebar} @@ -124,7 +120,7 @@ export class DevelopersPage extends React.Component
{ sourceUrl={sourceUrl} /> ); + const sidebar = ( + + ); return ( { categoryToPackages={CATEGORY_TO_PACKAGES} /> ); + const sidebar = ( + + ); return (