Skip to content

Comments

[fix] useRef에서 startTime.current 프로퍼티 누락 오류 수정#408

Merged
seongwon030 merged 2 commits intodevelop-fefrom
fix/#407-useref-start-time-current-FE-115
May 15, 2025
Merged

[fix] useRef에서 startTime.current 프로퍼티 누락 오류 수정#408
seongwon030 merged 2 commits intodevelop-fefrom
fix/#407-useref-start-time-current-FE-115

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented May 14, 2025

#️⃣연관된 이슈

ex) #407

📝작업 내용

useRef current

  • useTrackPageView에서 current 속성 추가했습니다. 2641daf

중복된 문자열

ClubDetailPage.tsx

  useTrackPageView(`ClubDetailPage Visited`, clubDetail?.name);

useTrackPageView.ts

  useEffect(() => {
    mixpanel.track(`${pageName} Visited`, {
    });

여기서 Visited가 중복됩니다.

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

@seongwon030 seongwon030 requested a review from oesnuj May 14, 2025 17:11
@seongwon030 seongwon030 self-assigned this May 14, 2025
@seongwon030 seongwon030 added 💻 FE Frontend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정 labels May 14, 2025
@netlify
Copy link

netlify bot commented May 14, 2025

Deploy Preview for moadong ready!

Name Link
🔨 Latest commit 024349f
🔍 Latest deploy log https://app.netlify.com/sites/moadong/deploys/6824cec790818b000880e28f
😎 Deploy Preview https://deploy-preview-408--moadong.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 34
Accessibility: 87
Best Practices: 92
SEO: 92
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 14, 2025

Walkthrough

이 변경사항은 Mixpanel 추적 이벤트에서 timestamp로 전달되는 값을 useRef 객체 자체에서 해당 객체의 .current 값으로 수정하고, useTrackPageView 훅을 호출할 때 첫 번째 인자를 "ClubDetailPage visited"에서 "ClubDetailPage"로 변경합니다. 다른 로직이나 제어 흐름에는 영향이 없습니다.

Changes

파일/경로 변경 요약
frontend/src/hooks/useTrackPageView.ts Mixpanel 이벤트에 전달되는 timestamp 값을 startTime.current로 수정
frontend/src/pages/ClubDetailPage/ClubDetailPage.tsx useTrackPageView 훅 호출 시 첫 번째 인자를 "ClubDetailPage"로 변경

Sequence Diagram(s)

sequenceDiagram
    participant ClubDetailPage
    participant useTrackPageView
    participant Mixpanel

    ClubDetailPage->>useTrackPageView: useTrackPageView("ClubDetailPage", clubDetail?.name)
    useTrackPageView->>Mixpanel: track({ page: "ClubDetailPage", name: clubDetail?.name, timestamp: startTime.current })
Loading

Assessment against linked issues

Objective Addressed Explanation
useRef에서 startTime.current 프로퍼티 누락 오류 수정 (FE-115)

Possibly related PRs

Suggested labels

🔨 Refactor

Suggested reviewers

  • oesnuj

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9b3b36b and 024349f.

📒 Files selected for processing (2)
  • frontend/src/hooks/useTrackPageView.ts (1 hunks)
  • frontend/src/pages/ClubDetailPage/ClubDetailPage.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - moadong
  • GitHub Check: Header rules - moadong
  • GitHub Check: Pages changed - moadong
🔇 Additional comments (2)
frontend/src/hooks/useTrackPageView.ts (1)

13-13: useRef의 current 값을 올바르게 전달하도록 수정했습니다.

이전에는 useRef 객체 자체를 timestamp로 전달하고 있었는데, 이는 객체 참조가 그대로 전달되어 Mixpanel에 정확한 타임스탬프 값이 기록되지 않았을 것입니다. .current 값을 사용하도록 수정하여 실제 숫자 값이 정확하게 전달되도록 한 것은 매우 적절한 변경입니다.

frontend/src/pages/ClubDetailPage/ClubDetailPage.tsx (1)

33-33: 페이지 이름 형식이 일관되게 수정되었습니다.

useTrackPageView 훅에서 내부적으로 ${pageName} Visited 형식으로 이벤트 이름을 구성하기 때문에, 이전의 "ClubDetailPage visited" 인자는 실제로 Mixpanel에 "ClubDetailPage visited Visited"와 같이 중복된 형태로 기록되었을 것입니다. 페이지 이름을 "ClubDetailPage"로 수정함으로써 이벤트 이름이 "ClubDetailPage Visited"로 일관되게 기록될 수 있도록 한 것은 매우 적절한 변경입니다.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@seongwon030 seongwon030 changed the title [fix] [fix] useRef에서 startTime.current 프로퍼티 누락 오류 수정 May 14, 2025
@seongwon030 seongwon030 linked an issue May 14, 2025 that may be closed by this pull request
1 task
Copy link
Member

@oesnuj oesnuj left a comment

Choose a reason for hiding this comment

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

코드래빗 뒷북..ㅎㅎ
수정 수고하셨습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] FE-115 useRef에서 startTime.current 프로퍼티 누락 오류 수정

2 participants