Skip to content

[SRLT-142] 랜딩페이지 반응형 수정#119

Merged
parknari02 merged 5 commits intodevelopfrom
SRLT-142-랜딩페이지-반응형
Mar 11, 2026

Hidden character warning

The head ref may contain hidden characters: "SRLT-142-\ub79c\ub529\ud398\uc774\uc9c0-\ubc18\uc751\ud615"
Merged

[SRLT-142] 랜딩페이지 반응형 수정#119
parknari02 merged 5 commits intodevelopfrom
SRLT-142-랜딩페이지-반응형

Conversation

@parknari02
Copy link
Member

@parknari02 parknari02 commented Mar 9, 2026

#️⃣ 관련 이슈

  • SRLT-142

✍️ 작업 내용 요약

사업계획서 작성 눌렀을 경우 모달 뒤 배경 이미지 추가 및 기타 작업

💡 작업 내용

기능

  • 데스크탑 경고 모달 뒤 배경 추가
  • 랜딩 페이지 전문가 리스트 이미지 수정
  • 기타 수정 작업

🖥️ 구현 화면

x.

기타 사항

x

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 모바일 알림 모달에 시각적 배경 옵션 추가
  • 개선사항

    • 데스크톱 접속 관련 안내 메시지 업데이트
    • 카운트다운 기능의 서버 렌더링 처리 최적화

@parknari02 parknari02 requested a review from Chasyuss March 9, 2026 14:57
@parknari02 parknari02 self-assigned this Mar 9, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

Walkthrough

모바일 알림 상태 관리가 단순 부울에서 표현력 있는 타입('business', 'price', null)으로 리팩토링되었습니다. 또한 배경 표시 옵션이 추가되고, useCountdown 훅의 SSR 처리가 마운트 플래그를 통해 최적화되었습니다.

Changes

Cohort / File(s) Summary
모바일 알림 상태 관리
src/app/_components/common/Header.tsx
isMobileAlertOpen 부울 상태를 mobileAlertType('business', 'price', null)으로 변경하여 더 명확한 알림 타입 추적 구현
모바일 알림 모달 업데이트
src/app/_components/common/MobileNavAlertModal.tsx
showBackground prop 추가 및 조건부 배경 이미지 렌더링, 모바일 안내 메시지 수정
랜딩 페이지 알림 통합
src/app/_components/landing/Landing.tsx, src/app/_components/landing/LandingChecklist.tsx, src/app/_components/landing/LandingPaySection.tsx
alertShowBackground 상태 추가 및 모달의 showBackground prop 연결로 조건부 배경 표시 기능 구현
카운트다운 훅 SSR 최적화
src/hooks/useCountdown.ts
calculateTimeLeft를 마운트 플래그 기반 처리로 리팩토링하여 SSR 안정성 개선

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • [SRLT-128] QA #96: Landing.tsx 및 LandingPaySection.tsx의 모달 상태 및 props 변경이 중복되어 상호작용할 가능성
  • dev 최신화 #92: LandingChecklist.tsx 및 LandingPaySection.tsx의 동일 컴포넌트 수정으로 코드 레벨에서 연관
  • [SRLT-142] 랜딩페이지 반응형 #113: Header.tsx와 MobileNavAlertModal의 알림 상태/핸들러 및 배경 prop 변경이 중복되어 관련

Suggested labels

✨ FEAT, 🧵 REFACTOR, 🐞 FIX

Suggested reviewers

  • Chasyuss
  • SeongHo5356

Poem

🐰 모달에 배경을 더하니, 화면이 반짝반짝!
상태가 enum으로 변신해, 코드가 더욱 명확해지고,
마운트 플래그가 SSR을 지켜주니,
타입체크와 함께 춤을 춘다네! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 주요 변경사항을 명확하게 설명하며, 랜딩페이지 반응형 수정이라는 변경의 핵심을 잘 요약하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch SRLT-142-랜딩페이지-반응형

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@Chasyuss Chasyuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다!

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/app/_components/common/MobileNavAlertModal.tsx`:
- Around line 19-36: The two decorative <Image> usages in the
MobileNavAlertModal component are currently given descriptive alt text which
makes screen readers announce irrelevant content; change both images to be
purely decorative by setting alt="" and adding aria-hidden="true" (or otherwise
marking them decorative via CSS background if you prefer), e.g., update the
Image elements rendered in MobileNavAlertModal to use alt="" and
aria-hidden="true" so assistive tech ignores them.

In `@src/hooks/useCountdown.ts`:
- Around line 20-24: The hook currently initializes timeLeft to initialTimeLeft
which renders "0d 0h 0m 0s" on SSR/hydration and looks expired; change
useCountdown so it doesn't expose the zero state before the component mounts:
keep mounted state (mounted) and set it true inside a useEffect, and either (A)
return a second value like isMounted (or null/undefined timeLeft) so callers can
render a hidden/sized placeholder before mount, or (B) have the hook itself
return a placeholder object (same layout size) until mounted; update references
to initialTimeLeft, useCountdown, timeLeft and mounted accordingly and apply the
same change at the other occurrence noted (line ~38) so no zero countdown is
rendered pre-mount.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 085d78c1-e43e-4a7c-a36b-1a7bd100c59d

📥 Commits

Reviewing files that changed from the base of the PR and between 028ab2d and 3670aac.

⛔ Files ignored due to path filters (8)
  • public/images/bussiness_mobile.png is excluded by !**/*.png
  • public/images/bussiness_tablet.png is excluded by !**/*.png
  • public/images/landing/landing_expert1.png is excluded by !**/*.png
  • public/images/landing/landing_expert1_mobile.png is excluded by !**/*.png
  • public/images/landing/landing_expert2.png is excluded by !**/*.png
  • public/images/landing/landing_expert2_mobile.png is excluded by !**/*.png
  • public/images/landing/landing_expert3.png is excluded by !**/*.png
  • public/images/landing/landing_expert3_mobile.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • src/app/_components/common/Header.tsx
  • src/app/_components/common/MobileNavAlertModal.tsx
  • src/app/_components/landing/Landing.tsx
  • src/app/_components/landing/LandingChecklist.tsx
  • src/app/_components/landing/LandingPaySection.tsx
  • src/hooks/useCountdown.ts

Comment on lines +19 to +36
<Image
src="/images/bussiness_mobile.png"
alt="사업계획서 배경"
fill
className="object-cover md:hidden"
quality={100}
unoptimized
priority
/>
<Image
src="/images/bussiness_tablet.png"
alt="사업계획서 배경"
fill
className="hidden object-cover md:block"
quality={100}
unoptimized
priority
/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

배경 이미지는 장식용으로 처리해주세요.

이 이미지는 정보 전달 역할이 아니라 시각적 배경이라서, 지금처럼 alt 텍스트를 두면 스크린리더가 불필요한 설명을 읽게 됩니다. alt=""로 비우고 aria-hidden을 주거나 CSS background로 옮기는 편이 접근성에 맞습니다.

♿ 제안 수정안
           <Image
             src="/images/bussiness_mobile.png"
-            alt="사업계획서 배경"
+            alt=""
+            aria-hidden="true"
             fill
             className="object-cover md:hidden"
             quality={100}
             unoptimized
             priority
           />
           <Image
             src="/images/bussiness_tablet.png"
-            alt="사업계획서 배경"
+            alt=""
+            aria-hidden="true"
             fill
             className="hidden object-cover md:block"
             quality={100}
             unoptimized
             priority
           />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Image
src="/images/bussiness_mobile.png"
alt="사업계획서 배경"
fill
className="object-cover md:hidden"
quality={100}
unoptimized
priority
/>
<Image
src="/images/bussiness_tablet.png"
alt="사업계획서 배경"
fill
className="hidden object-cover md:block"
quality={100}
unoptimized
priority
/>
<Image
src="/images/bussiness_mobile.png"
alt=""
aria-hidden="true"
fill
className="object-cover md:hidden"
quality={100}
unoptimized
priority
/>
<Image
src="/images/bussiness_tablet.png"
alt=""
aria-hidden="true"
fill
className="hidden object-cover md:block"
quality={100}
unoptimized
priority
/>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/_components/common/MobileNavAlertModal.tsx` around lines 19 - 36, The
two decorative <Image> usages in the MobileNavAlertModal component are currently
given descriptive alt text which makes screen readers announce irrelevant
content; change both images to be purely decorative by setting alt="" and adding
aria-hidden="true" (or otherwise marking them decorative via CSS background if
you prefer), e.g., update the Image elements rendered in MobileNavAlertModal to
use alt="" and aria-hidden="true" so assistive tech ignores them.

Comment on lines +20 to +24
const initialTimeLeft = { days: 0, hours: 0, minutes: 0, seconds: 0 };

export const useCountdown = (targetDate: string) => {
const [timeLeft, setTimeLeft] = useState(() => calculateTimeLeft(targetDate));
const [timeLeft, setTimeLeft] = useState(initialTimeLeft);
const [mounted, setMounted] = useState(false);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

초기 0 반환 때문에 카운트다운이 잠깐 만료된 것처럼 보입니다.

지금 구현은 SSR/초기 hydration에서 항상 0일 0시간 0분 0초를 먼저 그린 뒤 effect에서 실제 값으로 바뀝니다. hydration 에러는 피했지만, 랜딩 배너가 잠깐 종료된 것처럼 보여 첫 인상이 깨집니다. mount 전에는 값을 숨기거나 동일 크기 placeholder를 렌더링하도록 분리하는 편이 안전합니다.

Also applies to: 38-38

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/hooks/useCountdown.ts` around lines 20 - 24, The hook currently
initializes timeLeft to initialTimeLeft which renders "0d 0h 0m 0s" on
SSR/hydration and looks expired; change useCountdown so it doesn't expose the
zero state before the component mounts: keep mounted state (mounted) and set it
true inside a useEffect, and either (A) return a second value like isMounted (or
null/undefined timeLeft) so callers can render a hidden/sized placeholder before
mount, or (B) have the hook itself return a placeholder object (same layout
size) until mounted; update references to initialTimeLeft, useCountdown,
timeLeft and mounted accordingly and apply the same change at the other
occurrence noted (line ~38) so no zero countdown is rendered pre-mount.

@parknari02 parknari02 merged commit e682b02 into develop Mar 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants