diff options
author | Fabio Berger <me@fabioberger.com> | 2019-01-08 21:30:38 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2019-01-08 21:30:38 +0800 |
commit | 1631031fa74894143cb6835030b7dcd44d7c3c6b (patch) | |
tree | 06dea01cc64fb42905a5f95c95f4b3e16ecfe744 /packages/website/ts/pages/instant/instant.tsx | |
parent | 0bcb81d3a918fbcf71d68f42fa661d884d5d74cf (diff) | |
parent | 0ac36cef288deecd36caa601c53d13517eef5ca8 (diff) | |
download | dexon-sol-tools-1631031fa74894143cb6835030b7dcd44d7c3c6b.tar dexon-sol-tools-1631031fa74894143cb6835030b7dcd44d7c3c6b.tar.gz dexon-sol-tools-1631031fa74894143cb6835030b7dcd44d7c3c6b.tar.bz2 dexon-sol-tools-1631031fa74894143cb6835030b7dcd44d7c3c6b.tar.lz dexon-sol-tools-1631031fa74894143cb6835030b7dcd44d7c3c6b.tar.xz dexon-sol-tools-1631031fa74894143cb6835030b7dcd44d7c3c6b.tar.zst dexon-sol-tools-1631031fa74894143cb6835030b7dcd44d7c3c6b.zip |
Merge branch 'development' into feature/order-watcher/dockerize
* development: (898 commits)
Fixed merge conflict from development
Ran prettier
Doc generation working for changes by dutch auction wrapper
added changelog entry for monorepo-scripts
Hide dutch auction wrapper from docs -- hopefully this will prevent the "must export Web3Wrapper" error from doc generation
relaxed version on contract-extension dependencies
Added NetworkID 50 address for dutch auction wrapper
removed manual updte of package.json version
export dutch auction wrapper types from 0x.js
Export dutch auction wrapper in 0x.js
ran prettier
Minor documentation updates to dutch auction wrapper
`afterAuctionDetails` -> `auctionDetails`
Added @todo for including dutch auction addresses once deployed
Ran prettier & linter
Removed redundant assignment
removed needless newline on contract-wrappers changelog
removed timestamp from changelog for abi-gen-wrappers
added dutch auction address for testnets
removed .only
...
Diffstat (limited to 'packages/website/ts/pages/instant/instant.tsx')
-rw-r--r-- | packages/website/ts/pages/instant/instant.tsx | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/packages/website/ts/pages/instant/instant.tsx b/packages/website/ts/pages/instant/instant.tsx deleted file mode 100644 index d72585bfa..000000000 --- a/packages/website/ts/pages/instant/instant.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import { utils as sharedUtils } from '@0x/react-shared'; -import * as _ from 'lodash'; -import * as React from 'react'; -import * as DocumentTitle from 'react-document-title'; - -import { Footer } from 'ts/components/footer'; -import { MetaTags } from 'ts/components/meta_tags'; -import { TopBar } from 'ts/components/top_bar/top_bar'; -import { Container } from 'ts/components/ui/container'; -import { Configurator } from 'ts/pages/instant/configurator'; -import { Features } from 'ts/pages/instant/features'; -import { Introducing0xInstant } from 'ts/pages/instant/introducing_0x_instant'; -import { NeedMore } from 'ts/pages/instant/need_more'; -import { Screenshots } from 'ts/pages/instant/screenshots'; -import { Dispatcher } from 'ts/redux/dispatcher'; -import { colors } from 'ts/style/colors'; -import { ScreenWidths, WebsitePaths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; -import { utils } from 'ts/utils/utils'; - -export interface InstantProps { - location: Location; - translate: Translate; - dispatcher: Dispatcher; - screenWidth: ScreenWidths; -} - -export interface InstantState {} - -const CONFIGURATOR_HASH = 'configure'; -const THROTTLE_TIMEOUT = 100; -const DOCUMENT_TITLE = '0x Instant'; -const DOCUMENT_DESCRIPTION = '0x Instant'; - -export class Instant extends React.Component<InstantProps, InstantState> { - // TODO: consolidate this small screen scaffolding into one place (its being used in portal and docs as well) - private readonly _throttledScreenWidthUpdate: () => void; - public constructor(props: InstantProps) { - super(props); - this._throttledScreenWidthUpdate = _.throttle(this._updateScreenWidth.bind(this), THROTTLE_TIMEOUT); - } - public componentDidMount(): void { - window.addEventListener('resize', this._throttledScreenWidthUpdate); - window.scrollTo(0, 0); - } - public render(): React.ReactNode { - return ( - <Container overflowX="hidden"> - <MetaTags title={DOCUMENT_TITLE} description={DOCUMENT_DESCRIPTION} /> - <DocumentTitle title={DOCUMENT_TITLE} /> - <TopBar - blockchainIsLoaded={false} - location={this.props.location} - style={{ backgroundColor: colors.instantPrimaryBackground, position: 'relative' }} - translate={this.props.translate} - isNightVersion={true} - /> - <Container backgroundColor={colors.instantPrimaryBackground} /> - <Introducing0xInstant screenWidth={this.props.screenWidth} onCTAClick={this._onGetStartedClick} /> - <Screenshots screenWidth={this.props.screenWidth} /> - <Features screenWidth={this.props.screenWidth} onGetStartedClick={this._onGetStartedClick} /> - {!this._isSmallScreen() && <Configurator hash={CONFIGURATOR_HASH} />} - <NeedMore screenWidth={this.props.screenWidth} /> - <Footer translate={this.props.translate} dispatcher={this.props.dispatcher} /> - </Container> - ); - } - private readonly _onGetStartedClick = () => { - if (this._isSmallScreen()) { - utils.openUrl(`${WebsitePaths.Wiki}#Get-Started-With-Instant`); - } else { - this._scrollToConfigurator(); - } - }; - private _isSmallScreen(): boolean { - const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; - return isSmallScreen; - } - private _scrollToConfigurator(): void { - sharedUtils.setUrlHash(CONFIGURATOR_HASH); - sharedUtils.scrollToHash(CONFIGURATOR_HASH, ''); - } - private _updateScreenWidth(): void { - const newScreenWidth = utils.getScreenWidth(); - this.props.dispatcher.updateScreenWidth(newScreenWidth); - } -} |