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] 보조금 인터랙션 추가 ( resolve #23 ) #45

Merged
merged 16 commits into from
Jul 29, 2024

Conversation

lybell-art
Copy link
Collaborator

@lybell-art lybell-art commented Jul 29, 2024

#️⃣ 연관 이슈

📝 작업 내용

보조금 인터랙션을 추가했습니다.

  • 동전을 클릭하면 동전이 360도로 회전하면서 카운트를 1 증가시키고, 로티 애니메이션이 재생됩니다.
  • 동전을 스팸할 때에도 잘 동작합니다.

로티 애니메이션을 재생시키는 react-lottie-player 를 종속성에 추가했습니다.

  • npm install을 입력해서 종속성을 추가하세요.

참조 문서

https://github.com/airbnb/lottie-web

@lybell-art lybell-art added the feat 기능 구현 label Jul 29, 2024
@lybell-art lybell-art requested a review from darkdulgi July 29, 2024 09:18
@lybell-art lybell-art self-assigned this Jul 29, 2024
@lybell-art lybell-art linked an issue Jul 29, 2024 that may be closed by this pull request
4 tasks
Copy link
Collaborator

@darkdulgi darkdulgi left a comment

Choose a reason for hiding this comment

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

good

@darkdulgi darkdulgi merged commit 96c5710 into dev Jul 29, 2024
1 check passed
@lybell-art lybell-art deleted the feature/23-subsidyInteraction branch July 29, 2024 09:57
@lybell-art
Copy link
Collaborator Author

테스트 방법

App.jsx에 다음과 같이 작성하세요.

import { useRef } from "react";
import Demo from "./interactions/subsidy";
function App() {
  const ref = useRef(null);
  return (
    <div className="w-full h-dvh bg-black relative">
      <Demo $ref={ref} />
      <div className="absolute top-0 left-0 text-white">리셋</div>
    </div>

해당 인터랙션 컴포넌트가 상위 컴포넌트의 width, height값을 따르고 있기 때문에 div로 따로 묶어줘야 합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 기능 구현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 인터랙션-보조금
2 participants