From b7e81fb0dd3c70ad733c49c37189bfbd53b82b32 Mon Sep 17 00:00:00 2001 From: diminator Date: Wed, 19 Aug 2015 13:54:45 +0200 Subject: [PATCH] cyland landing --- .../wallet/components/cyland/cyland_hero.js | 20 +++++ .../components/cyland/cyland_landing.js | 77 +++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 js/components/whitelabel/wallet/components/cyland/cyland_hero.js create mode 100644 js/components/whitelabel/wallet/components/cyland/cyland_landing.js diff --git a/js/components/whitelabel/wallet/components/cyland/cyland_hero.js b/js/components/whitelabel/wallet/components/cyland/cyland_hero.js new file mode 100644 index 00000000..b98f407e --- /dev/null +++ b/js/components/whitelabel/wallet/components/cyland/cyland_hero.js @@ -0,0 +1,20 @@ +'use strict'; + +import React from 'react'; +import constants from '../../../../constants/application_constants'; + + +let Hero = React.createClass({ + render() { + return ( +
+ Sluice Art Prize +
+ ); + } +}); + +export default Hero; diff --git a/js/components/whitelabel/wallet/components/cyland/cyland_landing.js b/js/components/whitelabel/wallet/components/cyland/cyland_landing.js new file mode 100644 index 00000000..1512587e --- /dev/null +++ b/js/components/whitelabel/wallet/components/cyland/cyland_landing.js @@ -0,0 +1,77 @@ +'use strict'; + +import React from 'react'; +import Router from 'react-router'; + +import ButtonLink from 'react-router-bootstrap/lib/ButtonLink'; +import ButtonGroup from 'react-bootstrap/lib/ButtonGroup'; + +import UserStore from '../../../../../stores/user_store'; +import UserActions from '../../../../../actions/user_actions'; + +import { mergeOptions } from '../../../../../utils/general_utils'; + + +let CylandLanding = React.createClass({ + + mixins: [Router.Navigation], + + getInitialState() { + return mergeOptions( + UserStore.getState() + ); + }, + + componentDidMount() { + UserStore.listen(this.onChange); + UserActions.fetchCurrentUser(); + }, + + componentWillUnmount() { + UserStore.unlisten(this.onChange); + }, + + onChange(state) { + this.setState(state); + + // if user is already logged in, redirect him to piece list + if(this.state.currentUser && this.state.currentUser.email) { + // FIXME: hack to redirect out of the dispatch cycle + window.setTimeout(() => this.replaceWith('pieces'), 0); + } + }, + + render() { + return ( +
+
+
+
+ +
+
+
+
+ Existing ascribe user? +
+ + Log in + +
+
+
+ Do you need an account? +
+ + Sign up + +
+
+
+
+
+ ); + } +}); + +export default CylandLanding;