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

[#188] Fix: 뒤로가기 제어 #189

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

Heeeera
Copy link
Contributor

@Heeeera Heeeera commented Mar 21, 2024

💬 Issue Number

closes #188

🤷‍♂️ Description

replace 옵션 추가

아래 경우 경로 이동 시 replace: true 옵션을 추가해 페이지 이동 시 새로운 스택을 쌓지 않고 대체합니다.

  • 모임 생성 후 모임 상세 페이지로 이동
  • 모임 확정 후 모임 상세 페이지로 이동
  • 모임 확정 취소 후 모임 상세 페이지로 이동
  • 모임 삭제 후 메인 페이지로 이동
  • 리뷰 작성 후 종료된 게임 목록 페이지로 이동
  • 강퇴 후 모임 상세 페이지로 이동
  • 보드게임 공략 작성 후 보드게임 상세 페이지로 이동
  • 모임 상세 페이지 내 Tab 이동
  • 로그아웃 후 메인 페이지로 이동
  • 프로필 수정 후 프로필 페이지로 이동
  • 회원가입 페이지에서 메인 페이지로 이동

TabBar 뒤로가기

  • 모임 상세 페이지 TabBar 뒤로가기 버튼 클릭 시 메인 페이지로 이동하도록 수정했습니다.

👻 Good Function

import { useNavigate } from 'react-router-dom';

const navigate = useNavigate();

navigate(url, { replace: true };

📋 Check List

PR 전 체크해주세요.

  • Merge 하는 브랜치가 올바른가?
  • 코딩컨벤션을 준수하는가?
  • PR과 관련없는 변경사항이 없는가?

📒 Remarks

이동 전에 풀 스크린 모달(지하철역, 장소 피커)을 사용하는 작성 페이지는 모달 사용 시 pushState를 하기 때문에 브라우저 뒤로가기 버튼을 누르면 다시 작성 페이지로 이동하게 됩니다. 이 문제는 추후에 해결해야 할 것 같습니다!

  • 모임 생성, 모임 확정, 프로필 수정, 회원가입 페이지

@Heeeera Heeeera added the 🐞 Fix 버그 등의 오류 수정 label Mar 21, 2024
@Heeeera Heeeera added this to the 6차 스프린트 milestone Mar 21, 2024
@Heeeera Heeeera self-assigned this Mar 21, 2024
Copy link
Collaborator

@HoberMin HoberMin left a comment

Choose a reason for hiding this comment

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

고생하셨어요

@Heeeera Heeeera merged commit 8867af2 into main Mar 21, 2024
4 checks passed
@Heeeera Heeeera deleted the #188/fix/back-button-click-control/CHOI branch March 21, 2024 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Fix 버그 등의 오류 수정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fix] 뒤로가기 제어
4 participants