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

refac: 공연 상세는 레이지 로딩 하지 않으며 레이웃은 라우터에서 주입 #219

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

alstn2468
Copy link
Member

해당 작업 이유

  • 레이지 로딩 적용후 공연 상세에서 메뉴 이동시 깜빡임이 있는 것을 확인
  • 처음에 레이아웃 분리하면 될 줄 알고 레이아웃을 통으로 분리해 외부에서 사용하고 아래만 갈아끼우게 설정함
  • 해결이 되지 않아서 TabItem에서 쓰는 상태가 변해서 그런가 싶어서 분리해봄
  • 근데 해결이 되지 않아서 레이지 로딩을 해당 부분만 제거함 (그랬더니 정상 동작함)

기존 구조에서 레이아웃 분리해 둔 것은 그냥 유지하는 방향으로 PR을 올립니다.
커밋을 나눠야하나.. 와다다 개발해버린 관계로 쪼갤 수 없게된 점.. 양해 부탁드립니다

@alstn2468 alstn2468 requested a review from hexdrinker October 11, 2024 15:09
@alstn2468 alstn2468 self-assigned this Oct 11, 2024
@alstn2468 alstn2468 requested a review from Puterism as a code owner October 11, 2024 15:09
Comment on lines +80 to +85
onMouseDown={() => {
queryClient.prefetchQuery(queryKeys.show.detail(id));
queryClient.prefetchQuery(queryKeys.host.me(id));
queryClient.prefetchQuery(queryKeys.show.lastSettlementEvent(id));
queryClient.prefetchQuery(queryKeys.show.settlementInfo(id));
}}
Copy link
Member Author

Choose a reason for hiding this comment

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

레이아웃에서 데이터 없으면 문제가 생기므로 클릭시 미리 데이터 패칭

@@ -99,7 +99,6 @@ const ShowCastInfoFormDialogContent = ({ onDelete, prevShowCastInfo, onSave }: P
<Styled.Row key={field._id}>
<Controller
control={control}
defaultValue={field.userCode}
Copy link
Member Author

Choose a reason for hiding this comment

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

요 수정 사항은 콘솔에서 에러 발생해서 controlled input에서 defalutValue를 주입하는 곳은 제거

Comment on lines +133 to +147
{
path: '/',
element: (
<ShowDetailLayout>
<Outlet />
</ShowDetailLayout>
),
children: [
{ path: PATH.SHOW_INFO, element: <ShowInfoPage /> },
{ path: PATH.SHOW_TICKET, element: <ShowTicketPage /> },
{ path: PATH.SHOW_RESERVATION, element: <ShowReservationPage /> },
{ path: PATH.SHOW_ENTRANCE, element: <ShowEnterancePage /> },
{ path: PATH.SHOW_SETTLEMENT, element: <ShowSettlementPage /> },
],
},
Copy link
Member Author

Choose a reason for hiding this comment

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

레이아웃 사용하는 부분만 서브 라우터 분리

fontSize: '12px',
};

const TabItem = ({ type }: TabItemProps) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

파일을 따로 빼기는 애매해서 한 파일안에 넣어둠

@@ -1,19 +1,23 @@
export const PATH = {
Copy link
Member Author

Choose a reason for hiding this comment

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

수정사항은 없고 연관이 있는 것 끼리 또는 헷갈리지 않도록 개행 추가함

@alstn2468
Copy link
Member Author

사용성에 이슈가 있는 작업이라 먼저 머지합니다~ 후리뷰 부탁쓰

@alstn2468 alstn2468 merged commit faa09a9 into develop Oct 15, 2024
1 check passed
@alstn2468 alstn2468 deleted the refac/show-detail-layout branch October 15, 2024 08:08
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.

1 participant