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] 리뷰 상세 페이지에 react-query 추가 및 리팩토링 #161

Merged
merged 36 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e3eaa42
fix: src/index.tsx에서 enableMocking 제거
BadaHertz52 Jul 26, 2024
0cb8d19
feat: 리뷰 그룹 생성 시 코멘트 컴포넌트명 변경 및 기본값 설정
BadaHertz52 Jul 27, 2024
0a4cec6
refactor: 서버 DB에 있는 리뷰 데이터를 사용하기 위한 상수화
BadaHertz52 Jul 27, 2024
19fa32b
feat : QueryClient, QueryClientProvider 적용
BadaHertz52 Jul 27, 2024
339c22c
fix: dependencies에 있는 테스트 패키지들을 devDependencies로 옮김
BadaHertz52 Jul 27, 2024
90f1784
feat: 리뷰 상세페이지에 react-query 적용
BadaHertz52 Jul 27, 2024
f2e96a7
feat : msw에 리뷰 상세페이지 404 오류 추가
BadaHertz52 Jul 27, 2024
9721bda
ci: react-error-boundary 설치
BadaHertz52 Jul 27, 2024
9e31285
feat: Outlet에 QueryErrorResetBoundary,ErrorBoundary, Suspense 적용
BadaHertz52 Jul 27, 2024
251af38
feat: 리뷰 상세페이지에 useSuspenseQuery 적용
BadaHertz52 Jul 27, 2024
e45ddb4
refactor: 리뷰 상세페이지 resource, queryString key 상수화
BadaHertz52 Jul 27, 2024
41d8fb8
refactor: 리뷰 상세페이지 react-query key 상수화
BadaHertz52 Jul 27, 2024
54d927c
refactor: 리뷰 상세 페이지 컴포넌트 속에서만 사용하는 상수들 상수화
BadaHertz52 Jul 27, 2024
df18d3a
refactor: DetailedReviewPage/components에 index.tsx를 추가해 import 경로 간결하…
BadaHertz52 Jul 27, 2024
da20f40
fix: src/index.tsx에서 enableMocking 삭제
BadaHertz52 Jul 28, 2024
3783ed7
feat: error 전파를 위한 QueryClient 옵션 추가
BadaHertz52 Jul 28, 2024
80ca5a2
Merge branch 'develop' of https://github.com/woowacourse-teams/2024-r…
BadaHertz52 Jul 31, 2024
528eb22
Merge branch 'develop' of https://github.com/woowacourse-teams/2024-r…
BadaHertz52 Jul 31, 2024
6af1a65
fix: ErrorPage의 SideModal에 closeModal props로 줌
BadaHertz52 Jul 31, 2024
91d0a55
refactor: ErrorSection 위치 변경(src/pages/ErrorPage -> src/components/er…
BadaHertz52 Jul 31, 2024
d13fdfd
feat: ErrorFallback 컴포넌트 생성
BadaHertz52 Jul 31, 2024
f20698f
feat: ErrorSuspenseContainer 생성 및 App.tsx에 적용
BadaHertz52 Jul 31, 2024
f552fcf
chore: constants/index.ts export 경로 변경
BadaHertz52 Jul 31, 2024
d6d7696
chore: 3차-1주차 핵심 기능 시현 때 필요 없는 코드 주석 처리
BadaHertz52 Jul 31, 2024
9745350
docs: ErrorPage의 ERROR_MESSAGE 수정
BadaHertz52 Jul 31, 2024
67e2c5a
design: formWidth 변경 및 fontSize에 1.4rem 추가
BadaHertz52 Jul 31, 2024
4415a36
feat: 리뷰 상세 페이지에 리뷰이 이름 추가
BadaHertz52 Jul 31, 2024
872ff0b
refactor: 불필요한 export 삭제
BadaHertz52 Aug 1, 2024
bc93a51
chore: type명 수정 (RevieweeCommentProps =>RevieweeCommentsProps)
BadaHertz52 Aug 1, 2024
3032874
refactor: ErrorSection으l Button 수정
BadaHertz52 Aug 1, 2024
52f8de6
refactor: 리뷰 상세 페이지 데이터 타입 변경에 따른 수정
BadaHertz52 Aug 1, 2024
c148246
refactor: ErrorSuspenseContainer 적용 위치 변경
BadaHertz52 Aug 1, 2024
0da75a9
refactor: 리뷰 상세 페이지 데이터 타입 강제 방법 변경
BadaHertz52 Aug 1, 2024
88a2c23
chore: 불필요한 주석 삭제
BadaHertz52 Aug 1, 2024
79ee76b
refactor: ErrorSection의 buttons 네이밍 변경 및 요소에 key 추가
BadaHertz52 Aug 1, 2024
abe9154
chore: 스타일 주석에 NOTE 추가
BadaHertz52 Aug 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Outlet } from 'react-router';

import { Main, PageLayout, Sidebar, Topbar, SideModal, ErrorSuspenseContainer } from './components';
import { Main, PageLayout, Sidebar, Topbar, SideModal } from './components';
import { useSidebar } from './hooks';

const App = () => {
Expand All @@ -15,9 +15,7 @@ const App = () => {
)}
<Topbar openSidebar={openSidebar} />
<Main>
<ErrorSuspenseContainer>
<Outlet />
</ErrorSuspenseContainer>
<Outlet />
</Main>
</PageLayout>
);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/apis/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export const getDetailedReviewApi = async ({ reviewId, memberId }: { reviewId: n
throw new Error(createApiErrorMessage(response.status));
}

const data: DetailReviewData = await response.json();
return data;
const data = await response.json();
return data as DetailReviewData;
};

// 리뷰 리스트
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { createBrowserRouter, RouterProvider } from 'react-router-dom';

import App from '@/App';

import { ErrorSuspenseContainer } from './components';
import DetailedReviewPage from './pages/DetailedReviewPage';
import ErrorPage from './pages/ErrorPage';
import ReviewPreviewListPage from './pages/ReviewPreviewListPage';
Expand Down Expand Up @@ -44,7 +45,11 @@ const router = createBrowserRouter([
},
{
path: 'user/detailed-review/:id',
element: <DetailedReviewPage />,
element: (
Copy link
Contributor

Choose a reason for hiding this comment

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

무사히 적용돼서 다행입니다!!

<ErrorSuspenseContainer>
<DetailedReviewPage />
</ErrorSuspenseContainer>
),
},
],
},
Expand Down