Skip to content
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
1 change: 1 addition & 0 deletions front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@sentry/browser": "^8.28.0",
"@sentry/nextjs": "8",
"@tanstack/react-query": "^5.55.0",
"@tanstack/react-query-devtools": "^5.64.1",
"@types/react-slick": "^0.23.13",
"@vitest/coverage-v8": "^2.0.5",
"axios": "^1.7.7",
Expand Down
10 changes: 7 additions & 3 deletions front/src/app/gatherings/[id]/detail/page.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
import CommentsSection from "../../components/detail/comments-section/CommentsSection";
import GatherInfo from "../../components/detail/GatherInfo";
import GatheringSection from "../../components/detail/gathering-section/GatehringSection";

import {
HydrationBoundary,
QueryClient,
dehydrate,
} from "@tanstack/react-query";
import { prefetchGatherReview } from "@/hooks/queries/gatherDetailQuery";
import {
prefetchGatherReview,
prefetchGatherDetailQuery,
} from "@/hooks/queries/gatherDetailQuery";

export default async function Detail({ params }: { params: { id: number } }) {
const queryClient = new QueryClient();
const { id } = params;

await prefetchGatherReview(queryClient, { pageId: id, offset: 0, limit: 4 });
await prefetchGatherDetailQuery(queryClient, id);

const dehydratedState = dehydrate(queryClient);

return (
<div className="min-h-screen-minus-nav mx-auto container max-w-[1200px] px-6 md:px-[102px] pt-10 bg-white">
<GatherInfo pageId={id} />
<HydrationBoundary state={dehydratedState}>
<GatheringSection pageId={id} />
<CommentsSection pageId={id} />
</HydrationBoundary>
</div>
Expand Down
21 changes: 0 additions & 21 deletions front/src/app/gatherings/components/detail/GatherInfo.tsx

This file was deleted.

2 changes: 2 additions & 0 deletions front/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Navbar from "./components/Navbar";
import { ReactQueryClientProvider } from "./components/ReactQueryClientProvider";
import { Provider as SessionProvider } from "./components/SessionProvider";
import { Toast } from "./components/Toast";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";

export const metadata: Metadata = {
title: "같이달램",
Expand Down Expand Up @@ -46,6 +47,7 @@ export default function RootLayout({
<html lang="ko" className={`${pretendard.variable} font-pretendard`}>
<body className="w-full bg-gray-100 pt-[54px]">
<ReactQueryClientProvider>
<ReactQueryDevtools />
<SessionProvider>
<main>
<Navbar />
Expand Down
2 changes: 1 addition & 1 deletion front/src/hooks/queries/gatherDetailQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const useGatherDeatilQuery = (gatherId: number) => {
});
};

export const prefetchGatherDeatilQuery = async (
export const prefetchGatherDetailQuery = async (
queryClient: QueryClient,
gatherId: number,
) => {
Expand Down
Loading