diff --git a/client/src/components/ComparePage/ComparisonActionButtons.tsx b/client/src/components/ComparePage/ComparisonActionButtons.tsx index fc82e96..133ad37 100644 --- a/client/src/components/ComparePage/ComparisonActionButtons.tsx +++ b/client/src/components/ComparePage/ComparisonActionButtons.tsx @@ -5,6 +5,7 @@ interface ComparisonActionButtonsProps { rightButtonText?: string; onLeftClick: () => void; onRightClick: () => void; + className?: string; } const ComparisonActionButtons: React.FC = ({ @@ -12,10 +13,11 @@ const ComparisonActionButtons: React.FC = ({ rightButtonText, onLeftClick, onRightClick, + className = '', }) => { return (
diff --git a/client/src/components/ComparePage/ComparisonResult.tsx b/client/src/components/ComparePage/ComparisonResult.tsx index c4f3653..72bb680 100644 --- a/client/src/components/ComparePage/ComparisonResult.tsx +++ b/client/src/components/ComparePage/ComparisonResult.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { useEffect, useState } from 'react'; import togetherIcon from '@/assets/image/card_family.png'; import premiumAddonsIcon from '@/assets/icon/special.png'; import mediaAddonsIcon from '@/assets/icon/media.png'; @@ -22,6 +22,7 @@ const ComparisonResult: React.FC = ({ }) => { const [isModalOpen, setIsModalOpen] = useState(false); const [pendingLink, setPendingLink] = useState(null); + const [showButtons, setShowButtons] = useState(false); const handleDetailClick = (detailUrl?: string) => { if (detailUrl) { @@ -29,6 +30,25 @@ const ComparisonResult: React.FC = ({ setIsModalOpen(true); // 모달 먼저 띄우기 } }; + useEffect(() => { + const scrollContainer = document.querySelector('.scroll-target'); + if (!scrollContainer) return; + + const handleScroll = () => { + const scrollTop = scrollContainer.scrollTop; + const containerHeight = scrollContainer.clientHeight; + const scrollHeight = scrollContainer.scrollHeight; + + if (scrollTop + containerHeight >= scrollHeight - 100) { + setShowButtons(true); + } else { + setShowButtons(false); + } + }; + + scrollContainer.addEventListener('scroll', handleScroll); + return () => scrollContainer.removeEventListener('scroll', handleScroll); + }, []); // 데이터 값 계산 const leftDataValue = selectedLeft @@ -159,19 +179,27 @@ const ComparisonResult: React.FC = ({ />
- handleDetailClick(selectedLeft?.detailUrl)} onRightClick={() => handleDetailClick(selectedRight?.detailUrl)} + className={`fixed bottom-[50px] max-w-[560px] transition-all duration-500 + ${showButtons ? 'opacity-100 translate-y-0 pointer-events-auto' : 'opacity-0 translate-y-5 pointer-events-none'} + `} /> setIsModalOpen(false)} modalTitle="요금제 자세히 알아보기" - modalDesc="요금제 상세 페이지는 외부 사이트로 연결됩니다. 계속 진행하시겠습니까?" + modalDesc={ + <> + 요금제 상세 페이지는 외부 사이트로 연결됩니다. +
+ 계속 진행하시겠습니까? + + } >
- + {toastMessage && ( + setToastMessage('')} + /> + )} setShowCallModal(false)} - modalTitle="고객센터 080-019-7000" - modalDesc="상담원 연결을 시작할 경우, 이전에 진행한 상담은 모두 초기화됩니다." + modalTitle="고객센터 연결 | 080-019-7000" + modalDesc={ + <> + 상담원 연결을 진행할 경우, 이전에 진행한 상담은 모두 초기화됩니다. +
※ 전화 연결은 모바일 환경에서만 가능합니다. + + } > - - + {isMobile ? ( + { + e.stopPropagation(); + await navigator.clipboard.writeText('0800197000'); + }} + className="w-full" + > + + + ) : ( + + )}
); diff --git a/client/src/pages/ComparePage.tsx b/client/src/pages/ComparePage.tsx index 822dc1b..aeda201 100644 --- a/client/src/pages/ComparePage.tsx +++ b/client/src/pages/ComparePage.tsx @@ -146,7 +146,7 @@ const ComparePage: React.FC = () => {
openModal()} /> -
+
비교하고 싶은
diff --git a/client/src/pages/MainPage.tsx b/client/src/pages/MainPage.tsx index f41e27c..9741080 100644 --- a/client/src/pages/MainPage.tsx +++ b/client/src/pages/MainPage.tsx @@ -24,94 +24,99 @@ const MainPage: React.FC = () => { const shouldCenter = windowHeight >= 790; return ( -
-
- {/* 제목 */} - -

- LG U+ 요금제 추천 AI 챗봇 -

-

- Me플러스 -

-
+
+
+
+ {/* 제목 */} + +

+ LG U+ 요금제 추천 AI + 챗봇 +

+

+ Me플러스 +

+
- {/* 설명 */} - -

- 밤낮없이 24시간 상담 가능 -

-

- 내게 맞는 요금제, 지금 찾아보세요! -

-
+ {/* 설명 */} + +

+ 밤낮없이 24시간 상담 가능 +

+

+ 내게 맞는 요금제, 지금 찾아보세요! +

+
- {/* 카드들 */} -
- - + {/* 카드들 */} +
+ + + + 데이터 용량부터 사소한 궁금증까지 +
+ 해결해드려요. + + } + icon={chatbotIcon} + variant="primary" + size="large" + /> +
+
+ - 데이터 용량부터 사소한 궁금증까지 + 간단한 설문을 통해
- 해결해드려요. + 맞춤형 요금제를 찾아드려요. } - icon={chatbotIcon} - variant="primary" + icon={testIcon} + variant="gradient" size="large" /> - -
- - - 간단한 설문을 통해 -
- 맞춤형 요금제를 찾아드려요. - - } - icon={testIcon} - variant="gradient" - size="large" - /> -
- -
-
- -
-
- - 서비스 -
- 가이드 - - } - variant="shadow" - size="medium" - /> + + +
+
+ +
+
+ + 서비스 +
+ 가이드 + + } + variant="shadow" + size="medium" + /> +
-
- + +
diff --git a/client/src/pages/TestPage.tsx b/client/src/pages/TestPage.tsx index 91c2a71..f5c617c 100644 --- a/client/src/pages/TestPage.tsx +++ b/client/src/pages/TestPage.tsx @@ -257,174 +257,178 @@ const TestPage = () => { ); return ( -
-
+
+
+
- + -
-
- +
+
+ -
-

- {currentQuestion.text} -

+
+

+ {currentQuestion.text} +

- + style={{ willChange: 'transform' }} + > + 이전질문 + - -
- - {currentQuestion.type === 'binary' ? ( -
- handleSelect('yes')} - type="yes" - disabled={isTransitioning} - animationDisabled={animationDisabled} - /> - handleSelect('no')} - type="no" - disabled={isTransitioning} - animationDisabled={animationDisabled} - /> + style={{ willChange: 'transform' }} + > + 다음질문 +
- ) : ( -
- {currentQuestion.options?.map((opt) => ( - handleSelect(opt)} + + {currentQuestion.type === 'binary' ? ( +
+ handleSelect('yes')} + type="yes" disabled={isTransitioning} animationDisabled={animationDisabled} /> - ))} -
- )} + handleSelect('no')} + type="no" + disabled={isTransitioning} + animationDisabled={animationDisabled} + /> +
+ ) : ( +
+ {currentQuestion.options?.map((opt) => ( + handleSelect(opt)} + disabled={isTransitioning} + animationDisabled={animationDisabled} + /> + ))} +
+ )} -
-
- 꿀팁 -

- 꿀팁 -

-
-

- - “{currentQuestion.tip.highlight}” - - {currentQuestion.tip.rest} -

{' '} - {allAnswered && ( -
- -
- )} + if (bestPlan) { + navigate('/test-wait', { + state: { planId: bestPlan.id }, + }); + } else { + alert('조건에 맞는 요금제를 찾을 수 없어요.'); + } + }} + fullWidth + size="large" + variant="custom" + className="bg-secondary-purple-60 text-white text-[14px] px-4 py-[10px] rounded-[10px] font-medium w-full" + > + Me플러스 맞춤 추천 받기 + +
+ )} +
-
- setShowBackModal(false)} - modalTitle="맞춤형 요금제 찾기를 그만두시겠어요?" - modalDesc="홈으로 이동하면 현재 진행 중인 테스트는 초기화됩니다." - > - + - - + + +
); }; diff --git a/client/src/pages/TestResultPage.tsx b/client/src/pages/TestResultPage.tsx index a33d41b..3e4475a 100644 --- a/client/src/pages/TestResultPage.tsx +++ b/client/src/pages/TestResultPage.tsx @@ -142,169 +142,160 @@ const TestResultPage = () => { } return ( - <> - {isModalOpen && ( - setIsModalOpen(false)} - modalTitle="요금제 자세히 알아보기" - modalDesc="요금제 상세 페이지는 LG U+외부 사이트로 연결됩니다. 계속 진행하시겠습니까?" - > - + - + + )} + +
+
+
+ - 이동하기 - - - )} - -
-
-
- -
-
- {plan.name} -
- {plan.tagLine && ( -
- 더해서 - {plan.tagLine} +
+
+ {plan.name}
- )} -
- - - {/*
- 컨페티 - 무너 -
*/} - - {plan && ( - <> - - {showConfetti && ( - - - + {plan.tagLine && ( +
+ 더해서 + {plan.tagLine} +
)} -
+
+ -
- - -
- - )} -
-
- - - - - + {plan && ( + <> + + {showConfetti && ( + + + + )} + + +
+ + +
+ + )} +
+
+ + + + + + + + + +
+ +
    + {plan.description.split('\n').map((line, idx) => ( +
  • + {line} +
  • + ))} +
- - + + 월 {plan.price?.toLocaleString()}원
- -
    - {plan.description.split('\n').map((line, idx) => ( -
  • - {line} -
  • - ))} -
-
- - 월 {plan.price?.toLocaleString()}원 - +
+
+
+ + +
-
- - -
- +
); };