trainlog/web/src/routes/DashboardPage.tsx

41 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { DashboardGrid } from '../dashboard/DashboardGrid'
import type { DashboardSnapshot } from '../api/dashboard'
import type { PreparedItemsSnapshot } from '../api/preparedItems'
import type { AnalysisSnapshot } from '../api/analysis'
interface DashboardPageProps {
dashboard: DashboardSnapshot | null
pending: boolean
failed: boolean
preparedItems: PreparedItemsSnapshot | null
preparedItemsPending: boolean
preparedItemsFailed: boolean
analysis: AnalysisSnapshot | null
}
export function DashboardPage({
dashboard,
pending,
failed,
preparedItems,
preparedItemsPending,
preparedItemsFailed,
analysis,
}: DashboardPageProps) {
return (
<section className="page" aria-labelledby="page-title">
<div className="page-heading">
<div><p className="eyebrow">VUE D’ENSEMBLE</p><h1 id="page-title">Dashboard</h1></div>
</div>
<DashboardGrid
dashboard={dashboard}
pending={pending}
failed={failed}
preparedItems={preparedItems}
preparedItemsPending={preparedItemsPending}
preparedItemsFailed={preparedItemsFailed}
analysis={analysis}
/>
</section>
)
}