Skip to content

Conversation

@wynter24
Copy link
Contributor

@wynter24 wynter24 commented Feb 7, 2025

#️⃣연관된 이슈

#332

📝작업 내용

모임 찾기 페이지

  • 찜하기 낙관적 업데이트 관련 파일에 데이터 충돌 방지를 위한 기존 요청을 취소 로직 추가
  • 서버에서 찜 관련 데이터를 가져오기 위해 요청 시 token 추가
  • 배포를 위해 찜 UI 주석 처리
  • context api를 사용하여 Hydration 오류를 해결 중
  • 비 로그인 유저가 찜 클릭 시 로그인 안내창 표시

상세페이지

  • 비 로그인 유저가 참여하기 버튼을 클릭하면 로그인 안내창을 거치지 않고 바로 로그인 페이지로 이동하도록 수정
    참여하기를 클릭한 것은 로그인 후 참여할 의사가 있다는 것으로 판단되어 로그인 안내창을 띄우는 이전 동작을 삭제하였습니다.

미리보기, 사용방법

서버에서는 클라이언트 메서드를 사용할 수 없기 때문에 Next.js에서 제공하는 로직을 사용하여 쿠키에 저장된 토큰을 사용하였습니다.

import { cookies } from 'next/headers';

export async function getServerSideToken() {
  try {
    const cookieStore = cookies();
    return (await cookieStore).get('auth_token')?.value;
  } catch {
    return null;
  }
}

기타 참고사항

찜하기 낙관적 업데이트는 구현하였으나 Hydration 오류가 발생하여 우선 배포를 위해 찜 UI를 주석 처리하였습니다.
해당 오류는 배포 후 해결할 예정입니다.

…am3/FE into 332-feature-모임-찾기-페이지-찜하기-관련-작업
@wynter24 wynter24 added ♻️ Refactor 코드 리팩토링 🎨 Design UI/UX 디자인과 관련된 작업 labels Feb 7, 2025
@wynter24 wynter24 self-assigned this Feb 7, 2025
@vercel
Copy link

vercel bot commented Feb 7, 2025

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

Name Status Preview Comments Updated (UTC)
bookco ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2025 1:47am

@wynter24 wynter24 changed the title ♻️[Refactor] 모임 찾기 페이지 찜하기 관련 작업 ♻️[Refactor] 찜하기 구현 관련 작업 Feb 7, 2025
@wynter24 wynter24 changed the title ♻️[Refactor] 찜하기 구현 관련 작업 ♻️[Refactor] 찜하기 구현 작업 Feb 7, 2025
@wynter24 wynter24 merged commit 6d63a8b into 306-refactor-모임-찾기-페이지 Feb 7, 2025
7 of 8 checks passed
@wynter24 wynter24 deleted the 332-feature-모임-찾기-페이지-찜하기-관련-작업 branch February 7, 2025 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎨 Design UI/UX 디자인과 관련된 작업 ♻️ Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants