add sidebar with redux

- add store
	- add routes
	- add page wrapper, mainlayout
	- add nav folder
This commit is contained in:
Pritimay Sarkar
2023-08-01 15:38:22 +05:30
parent 75f65e81b4
commit 16b3f521d4
17 changed files with 1058 additions and 9 deletions

View File

@@ -0,0 +1,19 @@
import { useEffect } from "react";
import { useDispatch } from "react-redux";
import { setAppState } from "../store/appStateSlice";
const PageWrapper = (props) => {
const dispatch = useDispatch();
useEffect(() => {
if (props.state) {
dispatch(setAppState(props.state));
}
}, [dispatch, props]);
return (
<>{props.children}</>
);
};
export default PageWrapper;