[지라이슈없음] fetauredBrands scoll 위치 변경
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user