aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts')
-rw-r--r--packages/website/ts/components/documentation/tutorial_button.tsx9
-rw-r--r--packages/website/ts/components/dropdowns/developers_drop_down.tsx12
-rw-r--r--packages/website/ts/pages/documentation/home.tsx19
-rw-r--r--packages/website/ts/types.ts10
4 files changed, 28 insertions, 22 deletions
diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx
index b83fd82c2..0cb7d9de5 100644
--- a/packages/website/ts/components/documentation/tutorial_button.tsx
+++ b/packages/website/ts/components/documentation/tutorial_button.tsx
@@ -2,11 +2,12 @@ import { colors } from '@0xproject/react-shared';
import * as _ from 'lodash';
import * as React from 'react';
import { Link } from 'react-router-dom';
-import { Container } from 'ts/components/ui/container';
import { Text } from 'ts/components/ui/text';
-import { TutorialInfo } from 'ts/types';
+import { Deco, Key, TutorialInfo } from 'ts/types';
+import { Translate } from 'ts/utils/translate';
export interface TutorialButtonProps {
+ translate: Translate;
tutorialInfo: TutorialInfo;
}
@@ -44,10 +45,10 @@ export class TutorialButton extends React.Component<TutorialButtonProps, Tutoria
</div>
<div className="pl2">
<Text Tag="div" fontSize="18" fontColor={colors.lightLinkBlue} fontWeight="bold">
- {this.props.tutorialInfo.title}
+ {this.props.translate.get(this.props.tutorialInfo.title as Key, Deco.Cap)}
</Text>
<Text Tag="div" fontColor="#555555" fontSize="16">
- {this.props.tutorialInfo.description}
+ {this.props.translate.get(this.props.tutorialInfo.description as Key, Deco.Cap)}
</Text>
</div>
<div className="absolute" style={{ top: 31, right: 31 }}>
diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx
index bfd7287de..0af211bc1 100644
--- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx
+++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx
@@ -16,17 +16,17 @@ const gettingStartedKeyToLinkInfo1: ObjectMap<LinkInfo> = {
[Key.BuildARelayer]: {
link: `${WebsitePaths.Wiki}#Build-A-Relayer`,
},
- [Key.IntroTutorial]: {
+ [Key.OrderBasics]: {
link: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`,
},
};
const gettingStartedKeyToLinkInfo2: ObjectMap<LinkInfo> = {
- [Key.TradingTutorial]: {
- link: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`,
- },
- [Key.EthereumDevelopment]: {
+ [Key.DevelopOnEthereum]: {
link: `${WebsitePaths.Wiki}#Ethereum-Development`,
},
+ [Key.UseSharedLiquidity]: {
+ link: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`,
+ },
};
const popularDocsToLinkInfos: ObjectMap<LinkInfo> = {
[Key.ZeroExJs]: {
@@ -157,7 +157,7 @@ export class DevelopersDropDown extends React.Component<DevelopersDropDownProps,
const links = _.map(keyToLinkInfo, (linkInfo: LinkInfo, key: string) => {
i++;
const isLast = i === numLinks;
- const linkText = this.props.translate.get(key as Key, Deco.CapWords);
+ const linkText = this.props.translate.get(key as Key, Deco.Cap);
return (
<div className={`pr1 pt1 ${!isLast && 'pb1'}`} key={`dev-dropdown-link-${key}`}>
<Link
diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx
index ab29b7f07..cf2ba0eec 100644
--- a/packages/website/ts/pages/documentation/home.tsx
+++ b/packages/website/ts/pages/documentation/home.tsx
@@ -1,4 +1,4 @@
-import { colors } from '@0xproject/react-shared';
+import { colors, NestedSidebarMenu } from '@0xproject/react-shared';
import * as _ from 'lodash';
import * as React from 'react';
import DocumentTitle = require('react-document-title');
@@ -24,27 +24,27 @@ interface Package {
const THROTTLE_TIMEOUT = 100;
const TUTORIALS: TutorialInfo[] = [
{
- title: 'Develop on Ethereum',
+ title: Key.DevelopOnEthereum,
iconUrl: '/images/developers/tutorials/develop_on_ethereum.svg',
- description: 'Learn more about building applications ontop of the Ethereum blockchain',
+ description: Key.DevelopOnEthereumDescription,
location: `${WebsitePaths.Wiki}#Ethereum-Development`,
},
{
- title: 'Build a relayer',
+ title: Key.BuildARelayer,
iconUrl: '/images/developers/tutorials/build_a_relayer.svg',
- description: 'Learn how to build your own 0x relayer from scratch',
+ description: Key.BuildARelayerDescription,
location: `${WebsitePaths.Wiki}#Build-A-Relayer`,
},
{
- title: 'Learn the 0x order basics',
+ title: Key.OrderBasics,
iconUrl: '/images/developers/tutorials/0x_order_basics.svg',
- description: 'Tutorial on how to create, validate and fill an order over 0x protocol',
+ description: Key.OrderBasicsDescription,
location: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`,
},
{
- title: 'Tap into shared liquidity',
+ title: Key.UseSharedLiquidity,
iconUrl: '/images/developers/tutorials/use_shared_liquidity.svg',
- description: 'Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API',
+ description: Key.UseSharedLiquidityDescription,
location: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`,
},
];
@@ -322,6 +322,7 @@ export class Home extends React.Component<HomeProps, HomeState> {
<Container marginTop="36px">
{_.map(TUTORIALS, tutorialInfo => (
<TutorialButton
+ translate={this.props.translate}
tutorialInfo={tutorialInfo}
key={`tutorial-${tutorialInfo.title}`}
/>
diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts
index 106287178..a1325d9bc 100644
--- a/packages/website/ts/types.ts
+++ b/packages/website/ts/types.ts
@@ -469,9 +469,13 @@ export enum Key {
RocketChat = 'ROCKETCHAT',
TradeCallToAction = 'TRADE_CALL_TO_ACTION',
BuildARelayer = 'BUILD_A_RELAYER',
- EthereumDevelopment = 'ETHEREUM_DEVELOPMENT',
- IntroTutorial = 'INTRO_TUTORIAL',
- TradingTutorial = 'TRADING_TUTORIAL',
+ BuildARelayerDescription = 'BUILD_A_RELAYER_DESCRIPTION',
+ DevelopOnEthereum = 'DEVELOP_ON_ETHEREUM',
+ DevelopOnEthereumDescription = 'DEVELOP_ON_ETHEREUM_DESCRIPTION',
+ OrderBasics = 'ORDER_BASICS',
+ OrderBasicsDescription = 'ORDER_BASICS_DESCRIPTION',
+ UseSharedLiquidity = 'USE_SHARED_LIQUIDITY',
+ UseSharedLiquidityDescription = 'USE_SHARED_LIQUIDITY_DESCRIPTION',
ViewAllDocumentation = 'VIEW_ALL_DOCUMENTATION',
Sandbox = 'SANDBOX',
Github = 'GITHUB',