From 357f6a1c1ee1b490e224cbec503878b567702c84 Mon Sep 17 00:00:00 2001 From: mahdi Date: Mon, 4 Jul 2022 09:40:52 +0430 Subject: [PATCH] =?UTF-8?q?=DB=8C=DA=A9=20=D8=B3=D8=B1=DB=8C=20=D8=A7?= =?UTF-8?q?=D8=B2=20=D8=A8=D8=A7=DA=AF=20=D9=87=D8=A7=D8=B1=D9=88=20=DA=AF?= =?UTF-8?q?=D8=B1=D9=81=D8=AA=D9=85=E2=80=8C=20|=2040?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Dashboard/layouts/Main/Addresses/index.js | 7 ++++++- src/views/DeliveryForm/Address/index.js | 6 +++++- src/views/Favorites/index.js | 6 +++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/views/Dashboard/layouts/Main/Addresses/index.js b/src/views/Dashboard/layouts/Main/Addresses/index.js index 75add4f..6e2faf1 100644 --- a/src/views/Dashboard/layouts/Main/Addresses/index.js +++ b/src/views/Dashboard/layouts/Main/Addresses/index.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import { connect } from "react-redux"; import { @@ -40,6 +40,11 @@ const ProfileAddress = ({ getList(); }, []); + useEffect(() => { + // alert(); + window.scrollTo(0, 0); + }, []); + return (
{ + window.scrollTo(0, 0); + }, []); + return isMobile ? (
diff --git a/src/views/Favorites/index.js b/src/views/Favorites/index.js index 5d2a774..2bf14ca 100644 --- a/src/views/Favorites/index.js +++ b/src/views/Favorites/index.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import { connect } from "react-redux"; import { publicApi, userFavorite } from "../../redux/actions"; @@ -20,6 +20,10 @@ const Favorites = ({ getList(); }, []); + useEffect(() => { + // alert(); + window.scrollTo(0, 0); + }, []); return (
{bookmarkList.map((bookmark, index) => (