Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create YLS context for using baseURL #14

Merged
merged 8 commits into from
Jun 2, 2024
Merged

Conversation

Hanna922
Copy link
Member

@Hanna922 Hanna922 commented Jun 2, 2024

1️⃣ 어떤 작업을 했나요? (Summary)

기존 코드에 영향을 미치는 변경사항

  • 패키지 내부에서 쏘던 baseURL을 사용처에서 넣어줄 수 있도록 수정하였습니다.
  • LogScreen, LogClick을 사용할 때마다 baseURL을 넣어주는 불편함이 없도록 YLSWrapper를 최상위에 감싸도록 구현하였습니다.
  • YLSWrapper로 받은 baseURL은 Context API를 활용하여 전달되며, Logger 내에서 사용할 수 있도록 useYLSContext hook을 생성합니다.
  • useYLSContext를 통해 postLog를 사용할 수 있으며, 기존 postLog 파일을 대체합니다.

=> 해당 수정 사항에 맞게 apps/demo 를 수정합니다.

2️⃣ 알아두시면 좋아요!

YLS는 필요에 따라 예외적으로 any type을 사용해야 합니다.
따라서 logging-system/ 아래에 .eslintrc.cjs를 생성하여 no-explicit-any': 'off' 설정을 추가합니다.

4️⃣ 체크리스트 (Checklist)

  • main 브랜치의 최신 코드를 pull 받았나요?

@Hanna922 Hanna922 added feat New feature or request YLS @yourssu/logging-system-react labels Jun 2, 2024
@Hanna922 Hanna922 self-assigned this Jun 2, 2024
Copy link
Member

@intersoom intersoom left a comment

Choose a reason for hiding this comment

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

image

Copy link
Collaborator

@owl1753 owl1753 left a comment

Choose a reason for hiding this comment

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

👍

@Hanna922 Hanna922 merged commit cebdcc4 into main Jun 2, 2024
@Hanna922 Hanna922 deleted the feat/#10-yls-context branch June 2, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request YLS @yourssu/logging-system-react
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: setting baseURL in YLS
3 participants