Skip to content

fix(web): 데스크톱 창 모바일 폭에서 콜밴 화면 접근 가능하게 수정 - #76

Merged
ParkSungju01 merged 2 commits into
developfrom
fix/75-callvan-mobile-width-access
Nov 11, 2026
Merged

ParkSungju01 merged 2 commits into
developfrom
fix/75-callvan-mobile-width-access

Conversation

@ParkSungju01

Copy link
Copy Markdown
Collaborator

변경

데스크톱 브라우저에서 창을 모바일 폭으로 줄이면 카테고리에 콜밴팟 모집이 보이지만, 누르면 홈으로 이동했습니다. 콜밴 화면이 데이터를 불러올 때는 User-Agent 기준 기기로, 화면이 뜬 뒤에는 화면 폭으로 판단해 두 기준이 어긋났기 때문입니다.

콜밴 화면 접근을 기기 종류 대신 화면 폭(576px 이하)으로만 판단하도록 바꿨습니다.

  • 화면 이동 (routes/callvan.index.tsx load): 하이드레이션 이후 이동은 브라우저에서 실행되므로 matchMedia로 실제 폭을 확인하고, 넓은 창이면 홈으로 리다이렉트합니다. User-Agent 기반 302 리다이렉트는 없앴습니다.
  • SSR 직접 접근: 서버는 화면 폭을 알 수 없어 화면을 그린 뒤, 컴포넌트 effect가 폭을 확인해 넓은 창이면 홈으로 보냅니다. 하이드레이션 직후 useMediaQuery 값은 UA 기준 서버 값일 수 있어 matchMedia로 다시 확인합니다.
  • 창을 넓힌 경우: 기존처럼 effect가 홈으로 보냅니다.
  • useMediaQuery의 모바일 기준 쿼리(MOBILE_QUERY)를 export해 같은 기준을 씁니다.

검증

  • pnpm typecheck, pnpm lint, pnpm format:check, pnpm --filter @koin/web test 통과.
  • 브라우저에서 직접 눌러 보는 확인은 하지 않았습니다.

남은 전제

  • stage 배포 후 확인이 필요합니다.
    • 데스크톱 창을 576px 이하로 줄인 상태에서 카테고리 → 콜밴팟 모집 진입
    • 좁힌 데스크톱 창에서 /callvan 새로고침
    • 넓은 데스크톱 창에서 /callvan 직접 접근 시 홈으로 이동
    • 실제 모바일 기기 진입
  • 넓은 데스크톱 창에서 /callvan을 직접 열면 이전에는 서버가 바로 홈으로 보냈지만, 이제는 콜밴 화면이 잠깐 그려진 뒤 홈으로 이동합니다.

@ParkSungju01 ParkSungju01 self-assigned this Nov 11, 2026
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b149371a-b9dd-43dd-a638-dc180c9da481
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
koin-web baf0e80 Nov 11 2026, 03:40 PM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
koin-api baf0e80 Nov 11 2026, 03:40 PM

@ParkSungju01
ParkSungju01 merged commit 77d64b6 into develop Nov 11, 2026
7 checks 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.

[캠퍼스] 데스크톱 창을 모바일 폭으로 줄여도 콜밴팟 모집에 들어가지 못하고 홈으로 이동함

1 participant