From bd5b0fae9a677906742b8f6af8827d903fad798c Mon Sep 17 00:00:00 2001 From: everythingonblack Date: Fri, 15 Aug 2025 15:20:04 +0700 Subject: [PATCH] ok --- src/App.js | 21 +- src/components/ProductDetailPage.js | 9 +- src/components/Styles.module.css | 138 ++++++- src/components/pages/ProductsPage.js | 563 +++++++++++++++++++-------- 4 files changed, 568 insertions(+), 163 deletions(-) diff --git a/src/App.js b/src/App.js index 74cf227..921475b 100644 --- a/src/App.js +++ b/src/App.js @@ -24,8 +24,19 @@ function HomePage({ setShowedModal, productSectionRef, courseSectionRef, + scrollToProduct, + scrollToCourse, setWillDo }) { + + useEffect(() => { + const params = new URLSearchParams(window.location.search); + const tab = params.get('tab'); + + if(tab === 'products') scrollToProduct(); + if(tab === 'academy') scrollToCourse(); + }, [productSectionRef, courseSectionRef]); + return ( <> @@ -46,6 +57,7 @@ function HomePage({ /> +