-
Notifications
You must be signed in to change notification settings - Fork 2
[refactor] CD CRUD 알파테스트 및 리팩토링 #121
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bbcb7d3
fix: 마이페이지 트랙리스트 → /mycd 라우팅 url 형식 수정 (#120)
hansololiviakim b1fa738
style: 미사용 mock 파일 제거 (#120)
hansololiviakim 9aa52dd
feat: 마이페이지 /tracklist에서 뒤로가기 시 마이페이지 tab 선택 상태값 복원 (#120)
hansololiviakim 9e8c005
fix: 새로고침 시 state 값이 남아있지 않도록 일회성 사용 후 히스토리 state 초기화 (#120)
hansololiviakim 4573e6f
fix: 스티커 렌더링 위치 상세 조정 (#120)
hansololiviakim 1c57ed8
style: step3 버튼 폰트, pc 배경 이미지 사이즈 수정 (#120)
hansololiviakim 319698a
feat: customize step2 테마 버튼 마우스 드래그 스크롤 추가 (#120)
hansololiviakim 35cdb77
fix: 트랙리스트 수정 시 이전 데이터가 잠시 노출되던 현상 isFetching 추가해 수정 (#120)
hansololiviakim ee2749b
style: /customize step1 input background color 통일 (#120)
hansololiviakim 295a697
fix: 마이페이지 나의 CD, 좋아요한 CD 데이터 최신화 옵션 설정 (#120)
hansololiviakim a2705a3
feat: /mycd → /mypage/customize 랜딩 state 방식으로 수정 (#120)
hansololiviakim 594fe0a
fix: 마이페이지 /tracklist 나의CD 아닐 경우 편집 버튼 미노출 (#120)
hansololiviakim 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 hidden or 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
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,36 @@ | ||
| import { useEffect } from 'react' | ||
|
|
||
| export const useDragScroll = (ref: React.RefObject<HTMLElement>) => { | ||
| useEffect(() => { | ||
| const el = ref.current | ||
| if (!el) return | ||
|
|
||
| let startX = 0 | ||
| let scrollLeft = 0 | ||
| let isDown = false | ||
|
|
||
| const down = (e: MouseEvent) => { | ||
| isDown = true | ||
| startX = e.pageX - el.offsetLeft | ||
| scrollLeft = el.scrollLeft | ||
| } | ||
| const leave = () => (isDown = false) | ||
| const up = () => (isDown = false) | ||
| const move = (e: MouseEvent) => { | ||
| if (!isDown) return | ||
| e.preventDefault() | ||
| el.scrollLeft = scrollLeft - (e.pageX - el.offsetLeft - startX) | ||
| } | ||
|
|
||
| el.addEventListener('mousedown', down) | ||
| el.addEventListener('mouseleave', leave) | ||
| el.addEventListener('mouseup', up) | ||
| el.addEventListener('mousemove', move) | ||
| return () => { | ||
| el.removeEventListener('mousedown', down) | ||
| el.removeEventListener('mouseleave', leave) | ||
| el.removeEventListener('mouseup', up) | ||
| el.removeEventListener('mousemove', move) | ||
| } | ||
hansololiviakim marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, [ref]) | ||
| } | ||
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.