diff --git a/src/components/ButtonBetween/index.js b/src/components/ButtonBetween/index.js new file mode 100644 index 0000000..36bb3ec --- /dev/null +++ b/src/components/ButtonBetween/index.js @@ -0,0 +1,27 @@ +import React from "react"; +import { connect } from "react-redux"; + +export const ButtonBetween = ({ item, status, onClick, width }) => { + return ( + + ); +}; + +const mapStateToProps = (state) => ({}); + +const mapDispatchToProps = {}; + +export default connect(mapStateToProps, mapDispatchToProps)(ButtonBetween); diff --git a/src/router.js b/src/router.js index 539d8c0..a8a1803 100644 --- a/src/router.js +++ b/src/router.js @@ -130,8 +130,8 @@ function Router({ isDark, isMobile, headerOptions, dialog, menu, setMenu }) { hamburgerMenu: false, title: false, back: true, - menu: true, - bookmark: true, + menu: false, + bookmark: 'productId', }} /> } @@ -196,7 +196,7 @@ function Router({ isDark, isMobile, headerOptions, dialog, menu, setMenu }) { back: true, shown: true, menu: true, - bookmark: true, + bookmark: false, }} /> } diff --git a/src/views/Product/index.js b/src/views/Product/index.js index 606b873..d76abc5 100644 --- a/src/views/Product/index.js +++ b/src/views/Product/index.js @@ -2,19 +2,23 @@ import React, { useState, useEffect } from "react"; import { connect } from "react-redux"; import { toast } from "react-toastify"; import { book, userProduct, publicApi } from "../../redux/actions"; -import { Link } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom"; import proxy from "../../redux/proxy"; import location from "../../utils/location"; +import separate from "../../utils/separate"; + +//components import Button from "../../components/Button"; import Header from "../../components/Header"; import Comment from "./Comment"; import Rate from "./Rate"; import DesktopProductLayout from "./Desktop"; +import Loading from "../../components/Loading"; +import ButtonBetween from "../../components/ButtonBetween"; //assets import arrow from "../../assets/icons/dropdown-blue.svg"; - export const Product = ({ isMobile, productType, @@ -29,7 +33,8 @@ export const Product = ({ }) => { const [type, setType] = useState("physical"); const [desktopContentTransform, setDesktopContentTransform] = useState(false); - + const navigation = useNavigate(); + useEffect(() => { getInfo({ id: location.getId(), vod: true }); setHeaderOptions(headerOptions); @@ -43,11 +48,17 @@ export const Product = ({ }); } }, []); + return ( <> {/* Portrait */} {isMobile ? (