aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-19 02:04:16 +0800
committerFabio Berger <me@fabioberger.com>2018-03-19 02:04:16 +0800
commit5468358f2142549c68ffae0085ce7d31ea271ea4 (patch)
tree9c7886744f85a1ed6b1ced653d9312c30d5ffda2 /packages/website/ts/components
parent87044313c2219f7130c1856f636f3db29b0fd1c4 (diff)
downloaddexon-sol-tools-5468358f2142549c68ffae0085ce7d31ea271ea4.tar
dexon-sol-tools-5468358f2142549c68ffae0085ce7d31ea271ea4.tar.gz
dexon-sol-tools-5468358f2142549c68ffae0085ce7d31ea271ea4.tar.bz2
dexon-sol-tools-5468358f2142549c68ffae0085ce7d31ea271ea4.tar.lz
dexon-sol-tools-5468358f2142549c68ffae0085ce7d31ea271ea4.tar.xz
dexon-sol-tools-5468358f2142549c68ffae0085ce7d31ea271ea4.tar.zst
dexon-sol-tools-5468358f2142549c68ffae0085ce7d31ea271ea4.zip
Add Subprovider docs to website
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r--packages/website/ts/components/sidebar_header.tsx1
-rw-r--r--packages/website/ts/components/top_bar/top_bar.tsx33
2 files changed, 27 insertions, 7 deletions
diff --git a/packages/website/ts/components/sidebar_header.tsx b/packages/website/ts/components/sidebar_header.tsx
index 6fae03691..556243430 100644
--- a/packages/website/ts/components/sidebar_header.tsx
+++ b/packages/website/ts/components/sidebar_header.tsx
@@ -10,6 +10,7 @@ const titleToIcon: { [title: string]: string } = {
Deployer: 'zeroExJs.png',
'Sol-cov': 'zeroExJs.png',
'JSON Schemas': 'zeroExJs.png',
+ Subproviders: 'zeroExJs.png',
'0x Connect': 'connect.png',
'0x Smart Contracts': 'contracts.png',
Wiki: 'wiki.png',
diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx
index 66efe0d24..3a6ceed34 100644
--- a/packages/website/ts/components/top_bar/top_bar.tsx
+++ b/packages/website/ts/components/top_bar/top_bar.tsx
@@ -120,22 +120,28 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
primaryText={this.props.translate.get(Key.StandardRelayerApi, Deco.CapWords)}
/>
</a>,
- <Link key="subMenuItem-web3Wrapper" to={WebsitePaths.Web3Wrapper} className="text-decoration-none">
+ <Link key="subMenuItem-jsonSchema" to={WebsitePaths.JSONSchemas} className="text-decoration-none">
<MenuItem
style={{ fontSize: styles.menuItem.fontSize }}
- primaryText={this.props.translate.get(Key.Web3Wrapper, Deco.CapWords)}
+ primaryText={this.props.translate.get(Key.JsonSchemas, Deco.CapWords)}
/>
</Link>,
- <Link key="subMenuItem-deployer" to={WebsitePaths.Deployer} className="text-decoration-none">
+ <Link key="subMenuItem-subproviders" to={WebsitePaths.Subproviders} className="text-decoration-none">
<MenuItem
style={{ fontSize: styles.menuItem.fontSize }}
- primaryText={this.props.translate.get(Key.Deployer, Deco.CapWords)}
+ primaryText={this.props.translate.get(Key.Subproviders, Deco.CapWords)}
/>
</Link>,
- <Link key="subMenuItem-jsonSchema" to={WebsitePaths.JSONSchemas} className="text-decoration-none">
+ <Link key="subMenuItem-web3Wrapper" to={WebsitePaths.Web3Wrapper} className="text-decoration-none">
<MenuItem
style={{ fontSize: styles.menuItem.fontSize }}
- primaryText={this.props.translate.get(Key.JsonSchemas, Deco.CapWords)}
+ primaryText={this.props.translate.get(Key.Web3Wrapper, Deco.CapWords)}
+ />
+ </Link>,
+ <Link key="subMenuItem-deployer" to={WebsitePaths.Deployer} className="text-decoration-none">
+ <MenuItem
+ style={{ fontSize: styles.menuItem.fontSize }}
+ primaryText={this.props.translate.get(Key.Deployer, Deco.CapWords)}
/>
</Link>,
<Link key="subMenuItem-sol-cov" to={WebsitePaths.SolCov} className="text-decoration-none">
@@ -333,6 +339,14 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
</MenuItem>
</Link>
)}
+ {!this._isViewingSubprovidersDocs() && (
+ <Link to={WebsitePaths.Subproviders} className="text-decoration-none">
+ <MenuItem className="py2">
+ {this.props.translate.get(Key.Subproviders, Deco.Cap)}{' '}
+ {this.props.translate.get(Key.Docs, Deco.Cap)}
+ </MenuItem>
+ </Link>
+ )}
{!this._isViewingPortal() && (
<Link to={`${WebsitePaths.Portal}`} className="text-decoration-none">
<MenuItem className="py2">
@@ -366,6 +380,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
!this._isViewingDeployerDocs() &&
!this._isViewingJsonSchemasDocs() &&
!this._isViewingSolCovDocs() &&
+ !this._isViewingSubprovidersDocs() &&
!this._isViewingConnectDocs()) ||
_.isUndefined(this.props.menu)
) {
@@ -466,6 +481,9 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
private _isViewingSolCovDocs() {
return _.includes(this.props.location.pathname, WebsitePaths.SolCov);
}
+ private _isViewingSubprovidersDocs() {
+ return _.includes(this.props.location.pathname, WebsitePaths.Subproviders);
+ }
private _isViewingWiki() {
return _.includes(this.props.location.pathname, WebsitePaths.Wiki);
}
@@ -479,7 +497,8 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
this._isViewingDeployerDocs() ||
this._isViewingJsonSchemasDocs() ||
this._isViewingSolCovDocs() ||
+ this._isViewingSubprovidersDocs() ||
this._isViewingConnectDocs()
);
}
-}
+} // tslint:disable:max-file-line-count