Progress
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Redirect } from "react-router-dom";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import LandingPageStatic from "../../landing/index";
|
||||
@@ -12,7 +12,8 @@ const mapStateToProps = createStructuredSelector({
|
||||
export default connect(mapStateToProps, null)(LandingPage);
|
||||
|
||||
export function LandingPage({ currentUser }) {
|
||||
if (currentUser.authorized) return <Redirect to={"/manage"} />;
|
||||
const navigate = useNavigate();
|
||||
if (currentUser.authorized) return navigate("/manage");
|
||||
|
||||
return <LandingPageStatic />;
|
||||
//return <Redirect to={"/signin"} />;
|
||||
|
||||
Reference in New Issue
Block a user