This commit is contained in:
none
2023-03-23 17:29:43 +08:00
parent 9f90bd75d3
commit 89b6307e2d
16 changed files with 163 additions and 161 deletions

View File

@@ -1,7 +1,22 @@
import { useDispatch } from "react-redux";
import { Outlet } from "react-router-dom";
import { loginAction } from "../../store/user/loginUserSlice";
const InitPage = () => {
return <><Outlet /></>
interface Props {
loginData: any | null;
}
const InitPage = (props: Props) => {
const dispatch = useDispatch();
if (props.loginData) {
dispatch(loginAction(props.loginData));
}
return (
<>
<Outlet />
</>
);
};
export default InitPage;