[251211] fix: IntroPanel.new.jsx 포커스 조정-2

🕐 커밋 시간: 2025. 12. 11. 17:08:47

📊 변경 통계:
  • 총 파일: 1개
  • 추가: +8줄
  • 삭제: -13줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/views/IntroPanel/IntroPanel.new.jsx

🔧 주요 변경 내용:
  • 코드 정리 및 최적화

Performance: 코드 최적화로 성능 개선 기대
This commit is contained in:
2025-12-11 17:08:47 +09:00
parent 0593f54d6e
commit a3fe60ca70

View File

@@ -53,7 +53,7 @@ import { types } from "../../actions/actionTypes";
import { focusById } from "../../utils/spotlight-utils"; import { focusById } from "../../utils/spotlight-utils";
const Container = SpotlightContainerDecorator( const Container = SpotlightContainerDecorator(
{ enterTo: "last-focused" }, { enterTo: "#selectAllCheckbox" },
"div", "div",
); );
@@ -845,26 +845,21 @@ function IntroPanelWithOptional({
//20250903 pjh //20250903 pjh
//selectAll에서 포커스 올렸을때 처리 변경. //selectAll에서 포커스 올렸을때 처리 변경.
const onSelectAllSpotlightUp = () => { const onSelectAllSpotlightUp = () => {
const focusTimer = setTimeout(() => { setTimeout(() => {
Spotlight.focus("optionalCheckbox"); focusById("optionalCheckbox");
}, 10); }, 10);
return () => { // focusById("optionalCheckbox");
clearTimeout(focusTimer);
};
}; };
//Optional terms 체크박스가 체크가 되어있을때 아래로 내리면(3개전부 체크기준) agree로 가고, 아닐경우 select all로 포커스이동해야함. //Optional terms 체크박스가 체크가 되어있을때 아래로 내리면(3개전부 체크기준) agree로 가고, 아닐경우 select all로 포커스이동해야함.
const onOptionalTermSpotlightDown = () => { const onOptionalTermSpotlightDown = () => {
const focusTimer = setTimeout(() => { setTimeout(() => {
if (termsChecked && privacyChecked && optionalChecked) { if (termsChecked && privacyChecked && optionalChecked) {
Spotlight.focus("agreeButton"); focusById("agreeButton");
} else { } else {
Spotlight.focus("selectAllCheckbox"); focusById("selectAllCheckbox");
} }
}, 10); }, 10);
return () => {
clearTimeout(focusTimer);
};
}; };
// useEffect(() => { // useEffect(() => {
@@ -905,7 +900,7 @@ function IntroPanelWithOptional({
handleCancel={onCancel} handleCancel={onCancel}
spotlightId={spotlightId} spotlightId={spotlightId}
> >
<Container className={css.introLayout} defaultElement="selectAllCheckbox" {...rest}> <Container className={css.introLayout} defaultElement="#selectAllCheckbox" {...rest}>
{/* 첫 번째 영역: 헤더 섹션 */} {/* 첫 번째 영역: 헤더 섹션 */}
<div className={css.headerSection}> <div className={css.headerSection}>
<div className={css.titleContainer}> <div className={css.titleContainer}>