From 565c61787ee59db1581144885ef247ebe7833f4c Mon Sep 17 00:00:00 2001 From: mahdi Date: Mon, 4 Jul 2022 10:13:27 +0430 Subject: [PATCH] update src/views/Favorites/index.js, src/views/Orders/index.js and src/views/Videos/index.js --- src/views/Favorites/index.js | 1 + src/views/Orders/index.js | 9 ++++++++- src/views/Videos/index.js | 7 +++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/views/Favorites/index.js b/src/views/Favorites/index.js index 2bf14ca..b27d050 100644 --- a/src/views/Favorites/index.js +++ b/src/views/Favorites/index.js @@ -24,6 +24,7 @@ const Favorites = ({ // alert(); window.scrollTo(0, 0); }, []); + return (
{bookmarkList.map((bookmark, index) => ( diff --git a/src/views/Orders/index.js b/src/views/Orders/index.js index c3b249b..45fc970 100644 --- a/src/views/Orders/index.js +++ b/src/views/Orders/index.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import Order from "./components/Order"; import { connect } from "react-redux"; import { publicApi } from "../../redux/actions"; @@ -6,6 +6,7 @@ import { publicApi } from "../../redux/actions"; import bookImage from "../../assets/images/book-mini.svg"; function Orders({ orders = [], headerOptions, setHeaderOptions }) { + React.useEffect(() => { setHeaderOptions({ logo: true, @@ -17,6 +18,12 @@ function Orders({ orders = [], headerOptions, setHeaderOptions }) { menu: false, }); }, []); + + useEffect(() => { + // alert(); + window.scrollTo(0, 0); + }, []); + return (
{orders.map((order, index) => ( diff --git a/src/views/Videos/index.js b/src/views/Videos/index.js index d8a95ad..bfd9b8c 100644 --- a/src/views/Videos/index.js +++ b/src/views/Videos/index.js @@ -8,10 +8,17 @@ import NewestVideo from "./components/NewestVideo"; function Videos({ headerOptions, setHeaderOptions, getList, videos, grades }) { const [search, setSearch] = useState(""); + useEffect(() => { setHeaderOptions(headerOptions); getList({ vod: true }); }, []); + + useEffect(() => { + // alert(); + window.scrollTo(0, 0); + }, []); + return (
{/*