19 lines
495 B
TypeScript
19 lines
495 B
TypeScript
import { getPosts, getPerformance } from '@/lib/api'
|
|
import DashboardClient from './DashboardClient'
|
|
|
|
export const revalidate = 30
|
|
|
|
export default async function OverviewPage() {
|
|
const [posts, performance] = await Promise.allSettled([
|
|
getPosts(500, 1),
|
|
getPerformance(),
|
|
])
|
|
|
|
return (
|
|
<DashboardClient
|
|
initialPosts={posts.status === 'fulfilled' ? posts.value : []}
|
|
initialPerformance={performance.status === 'fulfilled' ? performance.value : undefined}
|
|
/>
|
|
)
|
|
}
|