mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-05 13:37:15 +01:00
fix(ssr): remove ssr:false dynamic import causing profile page streaming failure
The ProfilePageClient used dynamic(() => import('ProfileLayout'), { ssr: false })
which triggered BAILOUT_TO_CLIENT_SIDE_RENDERING. This created a nested template
boundary inside the Suspense streaming boundary, preventing $RV from resolving
the streamed content. Data is already fetched server-side, so ssr:false provided
no benefit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
6437881ab1
commit
ea9ce29ed2
1 file changed
+2
-23
@@ -1,21 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import dynamic from 'next/dynamic';
|
||||
import { ScalableProfile, Project } from '@/types/database';
|
||||
|
||||
// Dynamic import to keep initial payload small and preserve a skeleton
|
||||
const ProfileLayout = dynamic(() => import('@/components/profile/ProfileLayout'), {
|
||||
ssr: false,
|
||||
loading: () => (
|
||||
<div className="max-w-5xl mx-auto p-6">
|
||||
<div className="animate-pulse space-y-4">
|
||||
<div className="h-10 w-1/2 bg-gray-100 rounded" />
|
||||
<div className="h-4 w-1/3 bg-gray-100 rounded" />
|
||||
<div className="h-64 w-full bg-gray-100 rounded" />
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
});
|
||||
import ProfileLayout from '@/components/profile/ProfileLayout';
|
||||
|
||||
interface ProfilePageClientProps {
|
||||
profile: ScalableProfile;
|
||||
@@ -38,12 +24,5 @@ interface ProfilePageClientProps {
|
||||
}
|
||||
|
||||
export default function ProfilePageClient({ profile, projects, stats }: ProfilePageClientProps) {
|
||||
return (
|
||||
<ProfileLayout
|
||||
profile={profile}
|
||||
projects={projects}
|
||||
stats={stats}
|
||||
/>
|
||||
);
|
||||
return <ProfileLayout profile={profile} projects={projects} stats={stats} />;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user