diff --git a/com.twin.app.shoptime/src/views/JustForYouTestPanel/JustForYouTestPanel.jsx b/com.twin.app.shoptime/src/views/JustForYouTestPanel/JustForYouTestPanel.jsx index 864c21b9..3ebef3e9 100644 --- a/com.twin.app.shoptime/src/views/JustForYouTestPanel/JustForYouTestPanel.jsx +++ b/com.twin.app.shoptime/src/views/JustForYouTestPanel/JustForYouTestPanel.jsx @@ -44,8 +44,7 @@ const ListContainer = SpotlightContainerDecorator( const JustForYouTestPanel = ({ panelInfo, ...rest }) => { const dispatch = useDispatch(); - - const [showButton, setShowButton] = useState("showButton", true); + const cbChangePageRef = useRef(null); const shelfInfos = useSelector( (state) => state.foryou?.justForYouInfo?.shelfInfos @@ -59,10 +58,6 @@ const JustForYouTestPanel = ({ panelInfo, ...rest }) => { dispatch(popPanel(panel_names.JUST_FOR_YOU_TEST_PANEL)); }, [dispatch]); - const handleScroll = useCallback((e) => { - setShowButton(e.scrollTop === 0); - }, []); - const handleTopButtonClick = useCallback(() => { if (cbChangePageRef.current) { cbChangePageRef.current(0, true); @@ -72,10 +67,7 @@ const JustForYouTestPanel = ({ panelInfo, ...rest }) => { shelfInfos && shelfInfos.length > 0 && shelfInfos[0].productInfos?.length > 0 - ) { - // const firstProduct = shelfInfos[0].productInfos[0]; - // const target = `spotlightId-${shelfInfos[0].shelfId}-${shelfInfos[0].shelfExpsOrd}-${removeDotAndColon(firstProduct.contentId)}`; - // console.log("###target",target) + ) { Spotlight.focus("justForYouList_1"); } }, [shelfInfos]); @@ -118,8 +110,7 @@ const JustForYouTestPanel = ({ panelInfo, ...rest }) => { return ( = 5} + patnerName={partnerName} imageAlt={title} imageSource={thumbnail} label={`${index + 1} of ${productInfos.length}`} @@ -129,7 +120,7 @@ const JustForYouTestPanel = ({ panelInfo, ...rest }) => { productName={title} productId={contentId} onClick={handleItemClick} - spotlightId={`spotlightId-${shelfId}-${shelfExpsOrd}-${removeDotAndColon(contentId)}`} + spotlightId={`spotlightId-${shelfId}-${shelfExpsOrd}-${index}`} {...rest} /> );