diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-11-27 15:39:34 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-11-29 02:59:54 +0800 |
commit | 7a726e2740b8cbc885229ed377ef5fc89502301d (patch) | |
tree | 3cea30517547f8b3afa91e7da700483e05f76812 | |
parent | 53f8e1b3b426424bf4459605b48e706eb7fb6d90 (diff) | |
download | dexon-sol-tools-7a726e2740b8cbc885229ed377ef5fc89502301d.tar dexon-sol-tools-7a726e2740b8cbc885229ed377ef5fc89502301d.tar.gz dexon-sol-tools-7a726e2740b8cbc885229ed377ef5fc89502301d.tar.bz2 dexon-sol-tools-7a726e2740b8cbc885229ed377ef5fc89502301d.tar.lz dexon-sol-tools-7a726e2740b8cbc885229ed377ef5fc89502301d.tar.xz dexon-sol-tools-7a726e2740b8cbc885229ed377ef5fc89502301d.tar.zst dexon-sol-tools-7a726e2740b8cbc885229ed377ef5fc89502301d.zip |
feat(website): scaffolding for instant page
-rw-r--r-- | packages/website/ts/containers/instant.ts | 27 | ||||
-rw-r--r-- | packages/website/ts/index.tsx | 2 | ||||
-rw-r--r-- | packages/website/ts/pages/instant/instant.tsx | 12 | ||||
-rw-r--r-- | packages/website/ts/types.ts | 1 |
4 files changed, 42 insertions, 0 deletions
diff --git a/packages/website/ts/containers/instant.ts b/packages/website/ts/containers/instant.ts new file mode 100644 index 000000000..9bcfb903b --- /dev/null +++ b/packages/website/ts/containers/instant.ts @@ -0,0 +1,27 @@ +import * as React from 'react'; +import { connect } from 'react-redux'; +import { Dispatch } from 'redux'; +import { Instant as InstantComponent, InstantProps } from 'ts/pages/instant/instant'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { State } from 'ts/redux/reducer'; +import { Translate } from 'ts/utils/translate'; + +interface ConnectedState { + translate: Translate; +} + +interface ConnectedDispatch { + dispatcher: Dispatcher; +} + +const mapStateToProps = (state: State, _ownProps: InstantProps): ConnectedState => ({ + translate: state.translate, +}); + +const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); + +export const Instant: React.ComponentClass<InstantProps> = connect(mapStateToProps, mapDispatchToProps)( + InstantComponent, +); diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index faf7d8c87..050c201a3 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -7,6 +7,7 @@ import { MetaTags } from 'ts/components/meta_tags'; import { About } from 'ts/containers/about'; import { DocsHome } from 'ts/containers/docs_home'; import { FAQ } from 'ts/containers/faq'; +import { Instant } from 'ts/containers/instant'; import { Jobs } from 'ts/containers/jobs'; import { Landing } from 'ts/containers/landing'; import { LaunchKit } from 'ts/containers/launch_kit'; @@ -92,6 +93,7 @@ render( <Route exact={true} path="/" component={Landing as any} /> <Redirect from="/otc" to={`${WebsitePaths.Portal}`} /> <Route path={WebsitePaths.LaunchKit} component={LaunchKit as any} /> + <Route path={WebsitePaths.Instant} component={Instant as any} /> <Route path={WebsitePaths.Careers} component={Jobs as any} /> <Route path={WebsitePaths.Portal} component={LazyPortal} /> <Route path={WebsitePaths.FAQ} component={FAQ as any} /> diff --git a/packages/website/ts/pages/instant/instant.tsx b/packages/website/ts/pages/instant/instant.tsx new file mode 100644 index 000000000..0ecf39254 --- /dev/null +++ b/packages/website/ts/pages/instant/instant.tsx @@ -0,0 +1,12 @@ +import * as React from 'react'; + +import { Dispatcher } from 'ts/redux/dispatcher'; +import { Translate } from 'ts/utils/translate'; + +export interface InstantProps { + location: Location; + translate: Translate; + dispatcher: Dispatcher; +} + +export const Instant: React.StatelessComponent<InstantProps> = () => <div />; diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index 89c477085..9c4b8a018 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -353,6 +353,7 @@ export enum WebsitePaths { FAQ = '/faq', About = '/about', LaunchKit = '/launch-kit', + Instant = '/instant', Whitepaper = '/pdfs/0x_white_paper.pdf', SmartContracts = '/docs/contracts', Connect = '/docs/connect', |