Skip to content

반응형 관련 예약 api 요청 최적화 #345

@yeolyi

Description

@yeolyi

서버 렌더링을 할 때 유저의 화면 크기를 알 수 없어 아래처럼 요청합니다.

const [desktopReservations, mobileReservations] = await Promise.all([
  getWeeklyReservation({
    roomId,
    year: startOfWeek.getFullYear(),
    month: startOfWeek.getMonth() + 1,
    day: startOfWeek.getDate(),
  }),
  getWeeklyReservation({
    roomId,
    year: selectedDate.getFullYear(),
    month: selectedDate.getMonth() + 1,
    day: selectedDate.getDate(),
  }),
]);

클라이언드 사이드 렌더링으로 수정하거나, 원하는 날짜의 범위를 선택해 요청할 수 있도록 api를 개선합니다.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions