fix: use WebsitePaths type and update wiki link to new link

This commit is contained in:
fragosti 2018-12-04 12:43:39 -08:00
parent 36f22ba069
commit 110d05f645
5 changed files with 16 additions and 11 deletions

View File

@ -14,7 +14,7 @@ import { Text } from 'ts/components/ui/text';
import { ConfigGeneratorAddressInput } from 'ts/pages/instant/config_generator_address_input'; import { ConfigGeneratorAddressInput } from 'ts/pages/instant/config_generator_address_input';
import { FeePercentageSlider } from 'ts/pages/instant/fee_percentage_slider'; import { FeePercentageSlider } from 'ts/pages/instant/fee_percentage_slider';
import { colors } from 'ts/style/colors'; import { colors } from 'ts/style/colors';
import { WebsiteBackendTokenInfo } from 'ts/types'; import { WebsitePaths } from 'ts/types';
import { backendClient } from 'ts/utils/backend_client'; import { backendClient } from 'ts/utils/backend_client';
import { constants } from 'ts/utils/constants'; import { constants } from 'ts/utils/constants';
@ -113,7 +113,7 @@ export class ConfigGenerator extends React.Component<ConfigGeneratorProps, Confi
})); }));
}; };
private readonly _handleAffiliatePercentageLearnMoreClick = (): void => { private readonly _handleAffiliatePercentageLearnMoreClick = (): void => {
window.open('/wiki#Learn-About-Affiliate-Fees', '_blank'); window.open(`${WebsitePaths.Wiki}#Learn-About-Affiliate-Fees`, '_blank');
}; };
private readonly _handleSRASelection = (sraEndpoint: string) => { private readonly _handleSRASelection = (sraEndpoint: string) => {
const newConfig: ZeroExInstantBaseConfig = { const newConfig: ZeroExInstantBaseConfig = {

View File

@ -7,6 +7,7 @@ import { ActionLink } from 'ts/pages/instant/action_link';
import { CodeDemo } from 'ts/pages/instant/code_demo'; import { CodeDemo } from 'ts/pages/instant/code_demo';
import { ConfigGenerator } from 'ts/pages/instant/config_generator'; import { ConfigGenerator } from 'ts/pages/instant/config_generator';
import { colors } from 'ts/style/colors'; import { colors } from 'ts/style/colors';
import { WebsitePaths } from 'ts/types';
import { ZeroExInstantBaseConfig } from '../../../../instant/src/types'; import { ZeroExInstantBaseConfig } from '../../../../instant/src/types';
@ -51,7 +52,11 @@ export class Configurator extends React.Component<ConfiguratorProps> {
<Text fontSize="20px" lineHeight="28px" fontColor={colors.white} fontWeight={500}> <Text fontSize="20px" lineHeight="28px" fontColor={colors.white} fontWeight={500}>
Code Snippet Code Snippet
</Text> </Text>
<ActionLink displayText="Explore the Docs" linkSrc="/wiki#Get-Started" color={colors.grey} /> <ActionLink
displayText="Explore the Docs"
linkSrc={`${WebsitePaths.Wiki}#Get-Started-With-Instant`}
color={colors.grey}
/>
</Container> </Container>
<CodeDemo key={codeToDisplay}>{codeToDisplay}</CodeDemo> <CodeDemo key={codeToDisplay}>{codeToDisplay}</CodeDemo>
</Container> </Container>

View File

@ -6,7 +6,7 @@ import { Image } from 'ts/components/ui/image';
import { Text } from 'ts/components/ui/text'; import { Text } from 'ts/components/ui/text';
import { ActionLink, ActionLinkProps } from 'ts/pages/instant/action_link'; import { ActionLink, ActionLinkProps } from 'ts/pages/instant/action_link';
import { colors } from 'ts/style/colors'; import { colors } from 'ts/style/colors';
import { ScreenWidths } from 'ts/types'; import { ScreenWidths, WebsitePaths } from 'ts/types';
import { utils } from 'ts/utils/utils'; import { utils } from 'ts/utils/utils';
export interface FeatureProps { export interface FeatureProps {
@ -22,7 +22,7 @@ export const Features = (props: FeatureProps) => {
}; };
const exploreTheDocsLinkInfo = { const exploreTheDocsLinkInfo = {
displayText: 'Explore the docs', displayText: 'Explore the docs',
linkSrc: `${utils.getCurrentBaseUrl()}/wiki#Get-Started`, linkSrc: `${WebsitePaths.Wiki}#Get-Started-With-Instant`,
}; };
const tokenLinkInfos = isSmallScreen ? [getStartedLinkInfo] : [getStartedLinkInfo, exploreTheDocsLinkInfo]; const tokenLinkInfos = isSmallScreen ? [getStartedLinkInfo] : [getStartedLinkInfo, exploreTheDocsLinkInfo];
return ( return (
@ -41,7 +41,7 @@ export const Features = (props: FeatureProps) => {
linkInfos={[ linkInfos={[
{ {
displayText: 'Learn about affiliate fees', displayText: 'Learn about affiliate fees',
linkSrc: `${utils.getCurrentBaseUrl()}/wiki#Learn-About-Affiliate-Fees`, linkSrc: `${WebsitePaths.Wiki}#Learn-About-Affiliate-Fees`,
}, },
]} ]}
screenWidth={props.screenWidth} screenWidth={props.screenWidth}
@ -53,7 +53,7 @@ export const Features = (props: FeatureProps) => {
linkInfos={[ linkInfos={[
{ {
displayText: 'Explore AssetBuyer', displayText: 'Explore AssetBuyer',
linkSrc: `${utils.getCurrentBaseUrl()}/docs/asset-buyer`, linkSrc: `${WebsitePaths.Docs}/asset-buyer`,
}, },
]} ]}
screenWidth={props.screenWidth} screenWidth={props.screenWidth}

View File

@ -14,7 +14,7 @@ import { NeedMore } from 'ts/pages/instant/need_more';
import { Screenshots } from 'ts/pages/instant/screenshots'; import { Screenshots } from 'ts/pages/instant/screenshots';
import { Dispatcher } from 'ts/redux/dispatcher'; import { Dispatcher } from 'ts/redux/dispatcher';
import { colors } from 'ts/style/colors'; import { colors } from 'ts/style/colors';
import { ScreenWidths } from 'ts/types'; import { ScreenWidths, WebsitePaths } from 'ts/types';
import { Translate } from 'ts/utils/translate'; import { Translate } from 'ts/utils/translate';
import { utils } from 'ts/utils/utils'; import { utils } from 'ts/utils/utils';
@ -67,7 +67,7 @@ export class Instant extends React.Component<InstantProps, InstantState> {
} }
private readonly _onGetStartedClick = () => { private readonly _onGetStartedClick = () => {
if (this._isSmallScreen()) { if (this._isSmallScreen()) {
utils.openUrl(`${utils.getCurrentBaseUrl()}/wiki#Get-Started`); utils.openUrl(`${WebsitePaths.Wiki}#Get-Started-With-Instant`);
} else { } else {
this._scrollToConfigurator(); this._scrollToConfigurator();
} }

View File

@ -4,7 +4,7 @@ import { Button } from 'ts/components/ui/button';
import { Container } from 'ts/components/ui/container'; import { Container } from 'ts/components/ui/container';
import { Text } from 'ts/components/ui/text'; import { Text } from 'ts/components/ui/text';
import { colors } from 'ts/style/colors'; import { colors } from 'ts/style/colors';
import { ScreenWidths } from 'ts/types'; import { ScreenWidths, WebsitePaths } from 'ts/types';
import { constants } from 'ts/utils/constants'; import { constants } from 'ts/utils/constants';
import { utils } from 'ts/utils/utils'; import { utils } from 'ts/utils/utils';
@ -58,5 +58,5 @@ const onGetInTouchClick = () => {
utils.openUrl(constants.URL_ZEROEX_CHAT); utils.openUrl(constants.URL_ZEROEX_CHAT);
}; };
const onDocsClick = () => { const onDocsClick = () => {
utils.openUrl(`${utils.getCurrentBaseUrl()}/wiki#Get-Started`); utils.openUrl(`${WebsitePaths.Wiki}#Get-Started-With-Instant`);
}; };