@@ -6,6 +6,7 @@ import dynamic from "next/dynamic";
66import { notFound } from "next/navigation" ;
77
88import { DASHBOARD_TABS , type TabIdType } from "@/entities/user" ;
9+ import { UserProfileType } from "@/entities/user" ;
910import { TabLabelHeader } from "@/features/user" ;
1011import { useUserProfile } from "@/features/user/api/use-my-profile" ;
1112import { CommonItemTabSkeleton , ReviewTabSkeleton , CalendarTabSkeleton } from "@/widgets/user" ;
@@ -68,9 +69,10 @@ function isValidTabId(id: string): id is TabIdType {
6869interface UserTabContentProps {
6970 tabId : string ;
7071 targetUserId : number ;
72+ initialData : UserProfileType | undefined ;
7173}
7274
73- export function UserTabContent ( { tabId, targetUserId } : UserTabContentProps ) {
75+ export function UserTabContent ( { tabId, targetUserId, initialData } : UserTabContentProps ) {
7476 if ( ! isValidTabId ( tabId ) ) notFound ( ) ;
7577
7678 const currentTabId = tabId ;
@@ -79,7 +81,12 @@ export function UserTabContent({ tabId, targetUserId }: UserTabContentProps) {
7981 const currentTabConfig = DASHBOARD_TABS . find ( ( t ) => t . id === currentTabId ) ;
8082 if ( ! currentTabConfig ) notFound ( ) ;
8183
82- const { data : profile , isLoading, isFetching, isPending } = useUserProfile ( targetUserId ) ;
84+ const {
85+ data : profile ,
86+ isLoading,
87+ isFetching,
88+ isPending,
89+ } = useUserProfile ( targetUserId , initialData ) ;
8390
8491 // 핵심: 프로필/권한이 "확정"되기 전에는 비공개 판정을 하지 말고
8592 // 서버/클라 동일하게 스켈레톤을 렌더해서 트리를 고정한다.
0 commit comments