'use strict'; import React from 'react'; import Router from 'react-router'; import WhitelabelActions from '../../../../../actions/whitelabel_actions'; import WhitelabelStore from '../../../../../stores/whitelabel_store'; 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(), WhitelabelStore.getState() ); }, componentDidMount() { UserStore.listen(this.onChange); UserActions.fetchCurrentUser(); WhitelabelStore.listen(this.onChange); WhitelabelActions.fetchWhitelabel(); }, componentWillUnmount() { UserStore.unlisten(this.onChange); WhitelabelStore.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 (
Submissions to Cyland Archive are powered by ascribe

Existing ascribe user?

Log in

Do you need an account?

Sign up
); } }); export default CylandLanding;