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

[노철] - 페이지 서버컴포넌트 변경 #494

Merged
merged 24 commits into from
Jun 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
refactor : page 비동기
qkdl60 committed May 8, 2024
commit 7df96f903e17d442d6b485357eca42b348774d4e
12 changes: 6 additions & 6 deletions src/app/my/page.tsx
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@ import {
import { getUserInformationServer } from '@apis/server/getUserInformationServer';
import MyPageClientComponent from './MyPageClientComponent';

const queryClient = new QueryClient();
queryClient.prefetchQuery({
queryKey: [QUERY_KEY.USER_INFORMATION],
queryFn: () => getUserInformationServer(),
});
export default function Page() {
export default async function Page() {
const queryClient = new QueryClient();
await queryClient.prefetchQuery({
queryKey: [QUERY_KEY.USER_INFORMATION],
queryFn: () => getUserInformationServer(),
});
return (
<HydrationBoundary state={dehydrate(queryClient)}>
<MyPageClientComponent />