[선택약관] 선택약관 저장값변경.

- 홈배너에서 agree시 선택약관 값 Y로 변경되도록 변경.
 - 텀즈오브서비스에서도 선택약관 버튼눌렀을시에 맞춰 작동하도록 변경
This commit is contained in:
junghoon86.park
2025-09-23 14:32:22 +09:00
parent 794c91c909
commit 3d47774646
2 changed files with 91 additions and 37 deletions

View File

@@ -18,6 +18,7 @@ import {
} from '@enact/spotlight/SpotlightContainerDecorator';
import Spottable from '@enact/spotlight/Spottable';
import { types } from '../../../actions/actionTypes';
import {
changeAppStatus,
handleOptionalTermsAgree as handleOptionalTermsAgreeAction,
@@ -190,6 +191,7 @@ export default function HomeBanner({
});
const termsLoading = useSelector((state) => state.common.termsLoading);
const isGnbOpened = useSelector((state) => state.common.isGnbOpened);
const currentTermsFlag = useSelector((state) => state.common.termsFlag);
// 선택약관 동의여부
const introTermsAgree = useSelector(
(state) => state.common.termsFlag.optionalTerms
@@ -345,6 +347,13 @@ export default function HomeBanner({
const handleOptionalAgreeClick = useCallback(() => {
handleOptionalAgree();
setIsOptionalConfirmVisible(false);
dispatch({
type: types.GET_TERMS_AGREE_YN_SUCCESS,
payload: {
...currentTermsFlag,
optionalTerms: "Y",
},
});
}, [handleOptionalAgree]);
const handleOptionalDeclineClick = useCallback(() => {