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

[노철] - to top floating button 구현 #93

Merged
merged 9 commits into from
Nov 21, 2023

Conversation

qkdl60
Copy link
Contributor

@qkdl60 qkdl60 commented Nov 20, 2023

📌 이슈 번호

close #12

🚀 구현 내용

  • useThrottle 구현

  • to top floating button 구현

    • 이 버튼은 현재 head가 있는 페이지에서는 모두 적용되고 있습니다.
      Create-Next-App-프로필-1-Microsoft_-Edge-2023-11-20-21-55-44
  const throttle = useThrottle();

throttle(쓰로틀을 적용할 함수, 시간())// 쓰로틀을 적용시킨 함수가 실행된다.

📘 참고 사항

@qkdl60 qkdl60 added the 💡중간 보통단계 label Nov 20, 2023
@qkdl60 qkdl60 added this to the V1.0 milestone Nov 20, 2023
@qkdl60 qkdl60 self-assigned this Nov 20, 2023
Copy link
Contributor

@suehdn suehdn left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! 👍
제가 overflow 전체에 해놨는데 수정해주셨군요. 감사합니다 ㅎㅎ

Copy link
Contributor

@MinwooP MinwooP left a comment

Choose a reason for hiding this comment

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

와우 너무 잘 짜셨네요 !! 고생 하셨습니다 🤗

const throttle = useCallback(() => {
let timer: NodeJS.Timeout | null;
return (callback: () => void, delaySecond = 1) => {
if (timer) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

if문 중괄호 생략 가능하더라도 써주시면 좋을 것 같습니다 🤗

Suggested change
if (timer) return;
if (timer) {
return;
}

@qkdl60 qkdl60 merged commit 2ffb913 into dev Nov 21, 2023
@qkdl60 qkdl60 deleted the feat/#12/to-top-foating-button-component branch November 21, 2023 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡중간 보통단계
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[노철] - to top floating button 구현
3 participants