From 361ba6316bd44e593931b712f011543c03708b1f Mon Sep 17 00:00:00 2001 From: everythingonblack Date: Sun, 17 Aug 2025 23:59:18 +0700 Subject: [PATCH] ok --- src/App.js | 21 +- src/components/ProductDetailPage.js | 69 ++-- src/components/Styles.module.css | 138 ++++++- src/components/pages/ProductsPage.js | 563 +++++++++++++++++++-------- 4 files changed, 594 insertions(+), 197 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({ /> +