diff --git a/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx b/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx index ccdbd32a..89915d7c 100644 --- a/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx +++ b/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx @@ -655,7 +655,12 @@ export default function TabLayout({ topPanelName, onTabActivated, panelInfo }) { }, [tabActivated, subTabLastFocusId, mainSelectedIndex]); useEffect(() => { - const SCROLL_OFFSET_INDEX = 9; + const hasFeaturedBrands = + tabs[mainSelectedIndex]?.children[0]?.path !== undefined; + + const SCROLL_OFFSET_INDEX = hasFeaturedBrands ? 8 : 9; + + const y = hasFeaturedBrands ? 110 : 100; if (selectedSubIndex >= 0) { if (selectedSubIndex === 0) { @@ -670,7 +675,7 @@ export default function TabLayout({ topPanelName, onTabActivated, panelInfo }) { ) { const targetScrollIndex = selectedSubIndex - SCROLL_OFFSET_INDEX; scrollTopJobRef.current.start(() => - scrollTop({ y: 100 * targetScrollIndex }) + scrollTop({ y: y * targetScrollIndex }) ); return () => scrollTopJobRef.current.stop();