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

[FE] feat#30 강퇴 기능 구현 및 채팅렌더링 최적화 #266

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

always97
Copy link
Collaborator

➕ 이슈 번호


🔎 작업 내용

  • 강퇴 기능 구현
  • 최적화
    • 리액트 dev tool을 통해 채팅 리렌더링시에 GameHeader도 같이 리렌더링되는 상황파악
    • React.memo를 활용하여 값이 변하지 않았을 경우 리렌더링 되지 않도록 수정

🖼 참고 이미지

  • 개선 전

  • 개선 후


🎯 리뷰 요구사항 (선택)

  • 없음

✅ Check List

  • merge할 브랜치의 위치를 확인했나요?
  • Label을 지정했나요?

@always97 always97 self-assigned this Nov 25, 2024
@always97 always97 changed the title [FE] feat#30 강퇴 기능 구현 및 채팅렌더링 성능개선 [FE] feat#30 강퇴 기능 구현 및 채팅렌더링 최적화 Nov 25, 2024
Copy link
Collaborator

@DongHoonYu96 DongHoonYu96 left a comment

Choose a reason for hiding this comment

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

LGTM~

@@ -127,6 +127,11 @@ socketService.on('endGame', () => {
useRoomStore.getState().setGameState(GameState.END);
});

socketService.on('kickRoom', () => {
alert('강퇴당하였습니다.');
// 메인페이지 or 로비로 이동시키기?
Copy link
Collaborator

Choose a reason for hiding this comment

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

대기방목록으로 보내는건 어떤가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

논의결과 : 모달 후 메인페이지로 이동 버튼

Copy link
Collaborator

@ijun17 ijun17 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다

import { QuizSettingModal } from './QuizSettingModal';
import { socketService } from '@/api/socket';
import { usePlayerStore } from '@/features/game/data/store/usePlayerStore';
import { useQuizStore } from '@/features/game/data/store/useQuizStore';

export const GameHeader = () => {
export const GameHeader = React.memo(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

good

Copy link
Collaborator

@songbuild00 songbuild00 left a comment

Choose a reason for hiding this comment

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

Good

@always97 always97 merged commit 39ddbe3 into boostcampwm-2024:dev-fe Nov 26, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants