mirror of
https://github.com/ascribe/onion.git
synced 2025-02-01 20:39:57 +01:00
fix: ikonotv redirect to collection if logged in
This commit is contained in:
parent
0a0a34b0e3
commit
19f94110b7
@ -6,6 +6,7 @@ import Router from 'react-router';
|
|||||||
import ButtonLink from 'react-router-bootstrap/lib/ButtonLink';
|
import ButtonLink from 'react-router-bootstrap/lib/ButtonLink';
|
||||||
|
|
||||||
import UserStore from '../../../../../stores/user_store';
|
import UserStore from '../../../../../stores/user_store';
|
||||||
|
import UserActions from '../../../../../actions/user_actions';
|
||||||
|
|
||||||
import { getLangText } from '../../../../../utils/lang_utils';
|
import { getLangText } from '../../../../../utils/lang_utils';
|
||||||
|
|
||||||
@ -20,6 +21,7 @@ let IkonotvLanding = React.createClass({
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
UserStore.listen(this.onChange);
|
UserStore.listen(this.onChange);
|
||||||
|
UserActions.fetchCurrentUser();
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
@ -32,7 +34,7 @@ let IkonotvLanding = React.createClass({
|
|||||||
|
|
||||||
getEnterButton() {
|
getEnterButton() {
|
||||||
let redirect = 'login';
|
let redirect = 'login';
|
||||||
|
console.log(this.state)
|
||||||
if(this.state.currentUser && this.state.currentUser.email) {
|
if(this.state.currentUser && this.state.currentUser.email) {
|
||||||
redirect = 'pieces';
|
redirect = 'pieces';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user