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

Add: room diff calculation #770

Merged
merged 6 commits into from
May 14, 2024
Merged

Add: room diff calculation #770

merged 6 commits into from
May 14, 2024

Conversation

predict-woo
Copy link
Member

Summary

It closes #768

Images or Screenshots

Further Work

  • Do something...

@predict-woo predict-woo linked an issue Mar 26, 2024 that may be closed by this pull request
Copy link

netlify bot commented Mar 26, 2024

Deploy Preview for taxi-dev-preview ready!

Name Link
🔨 Latest commit 6b8f344
🔍 Latest deploy log https://app.netlify.com/sites/taxi-dev-preview/deploys/66437aea894e4d0007085978
😎 Deploy Preview https://deploy-preview-770--taxi-dev-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@predict-woo predict-woo marked this pull request as ready for review March 26, 2024 13:57
packages/web/src/pages/Home/NewRoom.tsx Show resolved Hide resolved
packages/web/src/pages/Home/NewRoom.tsx Show resolved Hide resolved
props.rooms &&
localRooms?.length &&
(props.rooms.length !== localRooms.length ||
JSON.stringify(props.rooms) !== JSON.stringify(localRooms.length))
Copy link

Choose a reason for hiding this comment

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

JSON.stringify(props.rooms) !== JSON.stringify(localRooms.length) 이거 뭐죠...???

Copy link

Choose a reason for hiding this comment

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

어떤 이유에서 작성된 코드인지는 몰라도.. 좋은 해결책처럼 보이지는 않습니다 ㅜ

Copy link
Member Author

Choose a reason for hiding this comment

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

엥 오타인듯 하네요 죄송합니다ㅜㅠ

useEffect(() => {
const interval = setInterval(fetchAllRooms, 1000 * 60 * 5);
const interval = setInterval(fetchAllRooms, 1000 * 10);
Copy link

Choose a reason for hiding this comment

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

10초마다 backend에 API request 를 날리는 군요 ㅜㅜㅜ
우리 서버 힘들겠군.. ㅜ

useSWR 이나 useQuery 쓰면 인터벌 하게 API 값 갱신하는 것 수동으로 안해줘도 될듯요?

Copy link
Member Author

Choose a reason for hiding this comment

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

이걸로 변경해보겠습니다!

@predict-woo predict-woo requested a review from GKim67 April 30, 2024 11:19
@predict-woo predict-woo merged commit 9df1307 into dev May 14, 2024
4 checks passed
@predict-woo predict-woo deleted the #768-rooms-realtime-update branch May 14, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

방 리스트 실시간 업데이트
4 participants