Skip to content

Commit

Permalink
Refactor : 테스트 제거 [임시] (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
jobkaeHenry authored Nov 11, 2023
1 parent abe6347 commit c1c622a
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 475 deletions.
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 />
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

0 comments on commit c1c622a

Please sign in to comment.