diff --git a/src/views/Product/Desktop/index.js b/src/views/Product/Desktop/index.js index b00095a..053d502 100644 --- a/src/views/Product/Desktop/index.js +++ b/src/views/Product/Desktop/index.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import ProductOverAll from "./ProductOverAll"; import ProductTab from "../../../components/ProductTab"; import ProductSuggestions from "../../../components/ProductSuggestion"; @@ -8,6 +8,9 @@ import Comments from "../../../components/Comments"; import QandA from "../../../components/QandA"; const DesktopProductLayout = () =>{ + useEffect(() => { + window.scrollTo(0, 0) + }, []) return (
diff --git a/src/views/Products/layouts/Main.js b/src/views/Products/layouts/Main.js index db2f768..c44e8bf 100644 --- a/src/views/Products/layouts/Main.js +++ b/src/views/Products/layouts/Main.js @@ -21,7 +21,9 @@ export const Main = ({ isMobile, headerOptions, videos, filter }) => { - + useEffect(() => { + window.scrollTo(0, 0) + }, []) const filteringNavItems = [ {