From dfe5752411509f8fe6b26a4aa23c182fc84b0948 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 4 Dec 2018 10:58:43 -0800 Subject: feat: update configurator snippet to actually work if copy and pasted --- packages/website/ts/pages/instant/configurator.tsx | 40 +++++++++++++--------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/pages/instant/configurator.tsx b/packages/website/ts/pages/instant/configurator.tsx index 9f1fa8359..e3766057e 100644 --- a/packages/website/ts/pages/instant/configurator.tsx +++ b/packages/website/ts/pages/instant/configurator.tsx @@ -22,7 +22,7 @@ export class Configurator extends React.Component { public state: ConfiguratorState = { instantConfig: { orderSource: 'https://api.radarrelay.com/0x/v2/', - availableAssetDatas: [], + availableAssetDatas: undefined, affiliateInfo: { feeRecipient: '', feePercentage: 0.01, @@ -65,35 +65,41 @@ export class Configurator extends React.Component { }; private readonly _generateCodeDemoCode = (): string => { const { instantConfig } = this.state; - return ` - - - - + + + -`; + }, 'body'); + + +`; }; private readonly _renderAvailableAssetDatasString = (availableAssetDatas: string[]): string => { const stringAvailableAssetDatas = availableAssetDatas.map(assetData => `'${assetData}'`); if (availableAssetDatas.length < 2) { return `[${stringAvailableAssetDatas.join(', ')}]`; } - return `[\n\t\t${stringAvailableAssetDatas.join(', \n\t\t')}\n ]`; + return `[\n ${stringAvailableAssetDatas.join( + ', \n ', + )}\n ]`; }; } -- cgit v1.2.3