Skip to content

feat: 농구 타임라인 대응#493

Merged
seongminn merged 6 commits intodevfrom
basketball-timeline-ui
Apr 15, 2026
Merged

feat: 농구 타임라인 대응#493
seongminn merged 6 commits intodevfrom
basketball-timeline-ui

Conversation

@seongminn
Copy link
Copy Markdown
Member

✅ 작업 내용

  • 농구 경기를 위한 타임라인 컴포넌트 수정

📝 참고 자료

  • 작업한 내용에 대한 부연 설명

♾️ 기타

  • 추가로 필요한 작업 내용

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
manager Ready Ready Preview, Comment Apr 15, 2026 0:29am
spectator Ready Ready Preview, Comment Apr 15, 2026 0:29am

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request expands the application to support basketball by introducing sport-specific types, hooks, and components, including a new basketball game page and a quarter-based scoreboard. The routing and navigation were updated to handle sport types via query parameters. Review feedback highlights the need for more robust logic in the basketball scoreboard to handle multiple overtime periods and correct team matching by ID. Suggestions were also made to improve table accessibility and ensure consistent terminology for free throws in the game timeline.

I am having trouble creating individual review comments. Click here to see my feedback.

apps/spectator/src/app/games/basketball/_components/score-board.tsx (18-28)

high

현재 로직은 연장전(OT)이 1회인 경우만 처리하고 있으며, scores 배열의 순서가 항상 [홈, 어웨이]라고 가정하고 있어 위험합니다. 농구는 여러 번의 연장전이 발생할 수 있으므로 quarterScores의 길이에 맞춰 동적으로 라벨을 생성하고, gameTeamId를 사용하여 정확한 팀의 점수를 매칭하는 것이 좋습니다.

  const labels = quarterScores.length > 4
    ? quarterScores.map(qs => qs.displayName)
    : BASE_LABELS;

  const scores = quarterScores.reduce(
    (acc, { scores: qScores }, index) => {
      const homeScore = qScores.find(s => s.gameTeamId === homeTeam.gameTeamId)?.score;
      const awayScore = qScores.find(s => s.gameTeamId === awayTeam.gameTeamId)?.score;

      acc.home[index] = homeScore ?? null;
      acc.away[index] = awayScore ?? null;

      return acc;
    },
    { home: Array(labels.length).fill(null), away: Array(labels.length).fill(null) },
  );

apps/spectator/src/app/games/basketball/_components/score-board.tsx (31-67)

medium

팀명 영역과 스코어 테이블이 별도의 레이아웃 요소로 분리되어 있어, 데이터 길이에 따라 행(row)의 높이가 어긋날 가능성이 있습니다. 또한 웹 접근성(A11y) 측면에서도 팀명을 테이블의 첫 번째 열(th 또는 td)로 포함하여 하나의 table 구조로 관리하는 것이 더 견고합니다.

apps/spectator/src/app/games/_components/cheer-talk/cheer-talk-timeline.tsx (67)

medium

농구 경기에서 1점 득점은 보통 '자유투'로 표현됩니다. _utils.tsx에 정의된 로직과 일관성을 유지하기 위해 1점인 경우 '자유투'로 표시하는 것이 적절해 보입니다.

          {teamName} {playerName} {scoreRecord.score === 1 ? '자유투' : `${scoreRecord.score}점슛`} 성공!

@seongminn seongminn changed the base branch from basketball-timeline to dev April 15, 2026 12:29
@seongminn seongminn merged commit f94807a into dev Apr 15, 2026
3 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.

2 participants