This commit is contained in:
Dave Richer
2023-12-06 17:35:27 -05:00
parent a043f7be24
commit 5c164f807d
68 changed files with 279 additions and 294 deletions

View File

@@ -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"} />;