From 473537e6e7e6b323b3768a479e1c2574a755c12c Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 19 Dec 2018 15:56:12 -0800 Subject: remove unused instant pages --- packages/website/ts/pages/instant/action_link.tsx | 46 --- .../website/ts/pages/instant/config_generator.tsx | 311 --------------------- packages/website/ts/pages/instant/configurator.tsx | 110 -------- packages/website/ts/pages/instant/features.tsx | 115 -------- .../ts/pages/instant/fee_percentage_slider.tsx | 77 ----- packages/website/ts/pages/instant/instant.tsx | 87 ------ 6 files changed, 746 deletions(-) delete mode 100644 packages/website/ts/pages/instant/action_link.tsx delete mode 100644 packages/website/ts/pages/instant/config_generator.tsx delete mode 100644 packages/website/ts/pages/instant/configurator.tsx delete mode 100644 packages/website/ts/pages/instant/features.tsx delete mode 100644 packages/website/ts/pages/instant/fee_percentage_slider.tsx delete mode 100644 packages/website/ts/pages/instant/instant.tsx (limited to 'packages/website/ts/pages') diff --git a/packages/website/ts/pages/instant/action_link.tsx b/packages/website/ts/pages/instant/action_link.tsx deleted file mode 100644 index c196f03ef..000000000 --- a/packages/website/ts/pages/instant/action_link.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import * as _ from 'lodash'; -import * as React from 'react'; - -import { Container } from 'ts/components/ui/container'; -import { Text } from 'ts/components/ui/text'; -import { colors } from 'ts/style/colors'; -import { utils } from 'ts/utils/utils'; - -export interface ActionLinkProps { - displayText: string; - linkSrc?: string; - onClick?: () => void; - fontSize?: number; - color?: string; - className?: string; -} - -export class ActionLink extends React.Component { - public static defaultProps = { - fontSize: 16, - color: colors.white, - }; - public render(): React.ReactNode { - const { displayText, fontSize, color, className } = this.props; - return ( - - - - {displayText} - - - - - - - ); - } - - private readonly _handleClick = (event: React.MouseEvent) => { - if (!_.isUndefined(this.props.onClick)) { - this.props.onClick(); - } else if (!_.isUndefined(this.props.linkSrc)) { - utils.openUrl(this.props.linkSrc); - } - }; -} diff --git a/packages/website/ts/pages/instant/config_generator.tsx b/packages/website/ts/pages/instant/config_generator.tsx deleted file mode 100644 index fbeeeaeaf..000000000 --- a/packages/website/ts/pages/instant/config_generator.tsx +++ /dev/null @@ -1,311 +0,0 @@ -import { StandardRelayerAPIOrderProvider } from '@0x/asset-buyer'; -import { getContractAddressesForNetworkOrThrow } from '@0x/contract-addresses'; -import { assetDataUtils } from '@0x/order-utils'; -import { ObjectMap } from '@0x/types'; -import * as _ from 'lodash'; -import * as React from 'react'; - -import { CheckMark } from 'ts/components/ui/check_mark'; -import { Container } from 'ts/components/ui/container'; -import { MultiSelect } from 'ts/components/ui/multi_select'; -import { Select, SelectItemConfig } from 'ts/components/ui/select'; -import { Spinner } from 'ts/components/ui/spinner'; -import { Text } from 'ts/components/ui/text'; -import { ConfigGeneratorAddressInput } from 'ts/pages/instant/config_generator_address_input'; -import { FeePercentageSlider } from 'ts/pages/instant/fee_percentage_slider'; -import { colors } from 'ts/style/colors'; -import { WebsitePaths } from 'ts/types'; -import { constants } from 'ts/utils/constants'; - -import { assetMetaDataMap } from '../../../../instant/src/data/asset_meta_data_map'; -import { ERC20AssetMetaData, ZeroExInstantBaseConfig } from '../../../../instant/src/types'; - -export interface ConfigGeneratorProps { - value: ZeroExInstantBaseConfig; - onConfigChange: (config: ZeroExInstantBaseConfig) => void; -} - -export interface ConfigGeneratorState { - isLoadingAvailableTokens: boolean; - // Address to token info - availableTokens?: ObjectMap; -} - -const SRA_ENDPOINTS = ['https://api.radarrelay.com/0x/v2/', 'https://sra.bamboorelay.com/0x/v2/']; - -export class ConfigGenerator extends React.Component { - public state: ConfigGeneratorState = { - isLoadingAvailableTokens: true, - }; - public componentDidMount(): void { - // tslint:disable-next-line:no-floating-promises - this._setAvailableAssetsFromOrderProvider(); - } - public componentDidUpdate(prevProps: ConfigGeneratorProps): void { - if (prevProps.value.orderSource !== this.props.value.orderSource) { - // tslint:disable-next-line:no-floating-promises - this._setAvailableAssetsFromOrderProvider(); - const newConfig: ZeroExInstantBaseConfig = { - ...this.props.value, - availableAssetDatas: undefined, - }; - this.props.onConfigChange(newConfig); - } - } - public render(): React.ReactNode { - const { value } = this.props; - if (!_.isString(value.orderSource)) { - throw new Error('ConfigGenerator component only supports string values as an orderSource.'); - } - return ( - - -