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

Refactor : 테스트 제거 [임시] #29

Merged
merged 2 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
292 changes: 0 additions & 292 deletions client/public/mockServiceWorker.js

This file was deleted.

5 changes: 2 additions & 3 deletions client/src/app/@Modal/(.)post/[userId]/[postId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import PostDetailPage from "@/app/post/[userId]/[postId]/page";
import ModalWrapper from "@/components/ModalWrapper";

const page = async ({ ...context }) => {
const parsedPostId = context.params.postId
const page = async ({ params }: { params: { postId: string } }) => {
return (
<ModalWrapper disableBox>
<PostDetailPage {...context} postNo={parsedPostId} />
<PostDetailPage params={params} />
</ModalWrapper>
);
};
Expand Down
2 changes: 0 additions & 2 deletions client/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Box, GlobalStyles } from "@mui/material";
import Pretendard from "~/assets/font/Pretendard";
import NavigationBar from "~/components/NavigationBar";
import "./globals.css";
import MSWInit from "@/components/mock/MSWInit";
import CustomQueryClientProvider from "@/components/queryClient/CustomQueryClientProvider";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";

Expand Down Expand Up @@ -42,7 +41,6 @@ export default function RootLayout({
overflow: "auto",
}}
>
<MSWInit></MSWInit>
{children}
</Box>
<NavigationBar />

Choose a reason for hiding this comment

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

위 코드 패치를 간략히 코드 리뷰해 드리겠습니다. 버그 위험 및 개선 제안이 있다면 환영합니다:

  1. import MSWInit from "@/components/mock/MSWInit";<MSWInit></MSWInit>을 제거한 후에도 결과에 영향을 미치지 않는다면, 이 코드는 삭제할 수 있습니다.
  2. Pretendard 폰트의 임포트 부분에서 ~/assets/font/Pretendard 경로를 확인하여 절대 경로 또는 상대 경로로 변경하는 것이 좋습니다.
  3. import { Box, GlobalStyles } from "@mui/material"; 문장 뒤에 개행이 필요합니다.

개선 제안을 참고하시기 바랍니다.

Expand Down
9 changes: 5 additions & 4 deletions client/src/app/post/[userId]/[postId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import PostDetail from "@/components/post/PostDetail";
import { getPostDetailQueryFn } from "@/queries/post/useGetPostDetailQuery";
import { redirect } from "next/navigation";

const PostDetailPage = async ({ ...context }) => {
const parsedPostId = context.params.postId;
const PostDetailPage = async ({ params }: { params: { postId: string } }) => {
const parsedPostId = params.postId;
let initialData;
try {
const initialData = await getPostDetailQueryFn(parsedPostId);
return <PostDetail postNo={parsedPostId} initialData={initialData} />;
initialData = await getPostDetailQueryFn(parsedPostId);
} catch {
redirect("/not-found");
}
return <PostDetail postNo={parsedPostId} initialData={initialData} />;
};

export default PostDetailPage;
5 changes: 0 additions & 5 deletions client/src/app/post/page.tsx

This file was deleted.

27 changes: 0 additions & 27 deletions client/src/components/mock/MSWInit.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions client/src/mocks/browser.ts

This file was deleted.

6 changes: 0 additions & 6 deletions client/src/mocks/handlers.ts

This file was deleted.

Loading
Loading