mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-28 05:46:36 +08:00
a2404a50ef
Static export only generates /cloudflare/groups/1.html. Unknown ids fell through to the dashboard index, bouncing the browser home and triggering React hydration error #418. Serve the generated group shell and resolve the real id from the pathname, matching the websites detail fallback.
31 lines
827 B
TypeScript
31 lines
827 B
TypeScript
import { Cloud } from 'lucide-react';
|
|
import { getTranslations } from 'next-intl/server';
|
|
import { Suspense } from 'react';
|
|
|
|
import { LoadingStateWithBorder } from '@/components/layout/loading';
|
|
|
|
import { CloudflareGroupDetailPageClient } from './page-client';
|
|
|
|
/** Placeholder for static export; real ids resolve client-side from the pathname. */
|
|
export async function generateStaticParams() {
|
|
return [{ id: '1' }];
|
|
}
|
|
|
|
export default async function CloudflareGroupDetailPage() {
|
|
const t = await getTranslations('cloudflare');
|
|
return (
|
|
<Suspense
|
|
fallback={
|
|
<div className='w-full py-6 px-1'>
|
|
<LoadingStateWithBorder
|
|
icon={Cloud}
|
|
description={t('loadingDetail')}
|
|
/>
|
|
</div>
|
|
}
|
|
>
|
|
<CloudflareGroupDetailPageClient />
|
|
</Suspense>
|
|
);
|
|
}
|