Team-def / recre-frontend

RecRe, a recreational game service powered by NextJS
https://treepark.shop
1 stars 3 forks source link

이모티콘이 캔버스 그리는걸 방해하는거 해결 #230

Closed poqop721 closed 6 months ago

poqop721 commented 6 months ago
  1. 게임 시작 소켓 받을 때 setEmotions 를 빈 배열로 주어서 해결.

  2. emotions 갯수가 20 이상일 때 배열을 자르는 방법을 썼었는데 makeEmotions 함수 안에서 emtion의 값이나 갯수를 가져오는게 안돼서 따로 useEffect 로 emotions 를 받아서 150개가 넘어가면 emotions 를 초기화 해주는 방식으로 바꿈. 다만 이렇게 하면 초기화될 때 화면에서 모든 이모티콘이 사라지는 문제가 있긴 한데 일단 이대로 가기로

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
recre-frontend ✅ Ready (Inspect) Visit Preview Dec 11, 2023 3:23pm