2025-01-27 15:09:58 +03:00

19 lines
508 B
TypeScript

import { getProfile } from '@/actions/profile';
import { ProfileCard } from '@/components/profile/profile-card';
import { dehydrate, HydrationBoundary, QueryClient } from '@tanstack/react-query';
export default async function ProfilePage() {
const queryClient = new QueryClient();
await queryClient.prefetchQuery({
queryFn: () => getProfile(),
queryKey: ['profile'],
});
return (
<HydrationBoundary state={dehydrate(queryClient)}>
<ProfileCard />
</HydrationBoundary>
);
}