Fetched User data on Login, modified PrivateRoute logic
This commit is contained in:
@@ -41,7 +41,7 @@ class Login extends Component {
|
||||
password,
|
||||
userToken
|
||||
} = this.props;
|
||||
if (userToken) return <Redirect to={"/"} />;
|
||||
if (userToken) return <Redirect to={"/user/profile"} />;
|
||||
return (
|
||||
<LoginView
|
||||
isSendingAuthRequest={isSendingAuthRequest}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { Component } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Link } from "react-router-dom";
|
||||
import { Link, Redirect } from "react-router-dom";
|
||||
import { Container, Form, Header, Message } from "semantic-ui-react";
|
||||
|
||||
import {
|
||||
@@ -39,8 +39,10 @@ class VerifyEmail extends Component {
|
||||
isSendingAuthRequest,
|
||||
authRequestError,
|
||||
authRequestSuccess,
|
||||
emailVerificationString
|
||||
emailVerificationString,
|
||||
userToken
|
||||
} = this.props;
|
||||
if (userToken) return <Redirect to={"/"} />;
|
||||
return (
|
||||
<VerifyEmailView
|
||||
isSendingAuthRequest={isSendingAuthRequest}
|
||||
|
||||
Reference in New Issue
Block a user