Initial Vite Configuration & addition of prettierrc.
This commit is contained in:
@@ -1,24 +1,22 @@
|
||||
import React, {useEffect} from "react";
|
||||
import {connect} from "react-redux";
|
||||
import {useNavigate} from "react-router-dom";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {selectCurrentUser} from "../../redux/user/user.selectors";
|
||||
import LandingPageStatic from "../../landing/index";
|
||||
import React, { useEffect } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { createStructuredSelector } from 'reselect';
|
||||
import { selectCurrentUser } from '../../redux/user/user.selectors';
|
||||
import { Spin } from 'antd';
|
||||
//import LandingPageStatic from "../../landing/index";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
currentUser: selectCurrentUser,
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, null)(LandingPage);
|
||||
|
||||
export function LandingPage({currentUser}) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
if (currentUser.authorized) {
|
||||
navigate('/manage/jobs');
|
||||
}
|
||||
}, [currentUser, navigate]);
|
||||
|
||||
return <LandingPageStatic/>;
|
||||
export function LandingPage({ currentUser }) {
|
||||
const navigate = useNavigate();
|
||||
console.log('Main');
|
||||
useEffect(() => {
|
||||
navigate('/manage/jobs');
|
||||
}, [currentUser, navigate]);
|
||||
return <Spin />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user