-
Notifications
You must be signed in to change notification settings - Fork 0
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: home-yls #220
Merged
Merged
feat: home-yls #220
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a69e01b
feat: 퀵링크에 logging-system 연결
owl1753 5cb9dca
refactor: useQuickLink 훅에서 QuickLink 컴포넌트로 변경
owl1753 e7f08a0
Merge remote-tracking branch 'origin/develop' into feat/#218-home-yls
owl1753 292e9b7
fix: user data recoil에서 react-query로 변경
owl1753 53fc99b
fix: 모든 퀵링크 로그 남기도록 수정
owl1753 243fc5a
delete: platform 제거
owl1753 18739f5
Merge remote-tracking branch 'origin/develop' into feat/#218-home-yls
owl1753 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
|
||
import { LogClick } from '@yourssu/logging-system-react'; | ||
|
||
import { useGetUserData } from '@/home/hooks/useGetUserData.ts'; | ||
|
||
interface QuickLinkProps { | ||
icon: { icon: string; link: string }; | ||
order: string; | ||
children: React.ReactElement; | ||
} | ||
|
||
export const QuickLink = ({ icon, order, children }: QuickLinkProps) => { | ||
const { data: currentUser } = useGetUserData(); | ||
const userId = currentUser?.email || ''; | ||
|
||
const logParams = { | ||
userId, | ||
version: 1, | ||
event: { | ||
platform: 'web', | ||
name: 'quickLinkItemClicked', | ||
screen: 'Home', | ||
params: { | ||
link: icon.link, | ||
order, | ||
}, | ||
}, | ||
}; | ||
|
||
return <LogClick params={logParams}>{children}</LogClick>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YLS 문서 보시면 timestamp랑 platform은 yls 내부에서 처리한다고 적혀있는데, 요렇게 platform 또 넣어줄 필요 없어용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헙 yls 문서 잘못 보고 event쪽은 다 직접 처리 하는 것으로 착각했네요 수정하겠습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete: platform 제거delete: platform 제거에서 반영했습니다~