@@ -33,12 +29,37 @@ const Favorites = ({ bookmarkList, isMobile }) => {
);
};
+const Bookmark = ({ bookmark }) => {
+ return (
+
+
+
+
+
+ {bookmark.name}
+
+ {bookmark.grade}
+
+
+
+
+
+
+ );
+};
+
const mapStateToProps = (state) => ({
loading: state.userFactor.loading,
isMobile: state.publicApi.isMobile,
+ bookmarkList: state.userFavorite.list,
});
-const mapDispatchToProps = {};
+const mapDispatchToProps = {
+ setHeaderOptions: publicApi.setHeaderOptions,
+ getList: userFavorite.list,
+};
export default connect(mapStateToProps, mapDispatchToProps)(Favorites);
diff --git a/src/views/Orders/index.js b/src/views/Orders/index.js
index 9030453..eeed277 100644
--- a/src/views/Orders/index.js
+++ b/src/views/Orders/index.js
@@ -1,10 +1,15 @@
import React from "react";
import Order from "./components/Order";
import { connect } from "react-redux";
+import {publicApi} from '../../redux/actions';
+
//assets
import bookImage from "../../assets/images/book-mini.svg";
-function Orders({ orders }) {
+function Orders({ orders, headerOptions, setHeaderOptions }) {
+ React.useEffect(() => {
+ setHeaderOptions(headerOptions);
+ },[]);
return (
{orders.map((order, index) => (
@@ -14,9 +19,13 @@ function Orders({ orders }) {
);
}
-const mapStateToProps = () => ({});
+const mapStateToProps = (state) => ({
+ isMobile : state.publicApi.isMobile,
+
+});
const mapDispatchToProps = {
+ setHeaderOptions: publicApi.setHeaderOptions,
};
export default connect(mapStateToProps, mapDispatchToProps)(Orders);