20 lines
697 B
TypeScript
20 lines
697 B
TypeScript
import { getServerApi } from '@garage/api/server'
|
|
import { InspectionGeneralInfo } from '@/modules/inspections/inspection-general-info'
|
|
import DashboardPage from '@/base/components/layout/dashboard/dashboard-page'
|
|
|
|
export default async function page(props: { params: Promise<{ id: string }> }) {
|
|
const { id } = await props.params
|
|
const api = await getServerApi()
|
|
const inspection = await api.inspections.getById(id)
|
|
|
|
if (!inspection.data) {
|
|
return <div className="text-muted-foreground">Inspection not found.</div>
|
|
}
|
|
|
|
return (
|
|
<DashboardPage header={null}>
|
|
<InspectionGeneralInfo inspection={inspection.data} />
|
|
</DashboardPage>
|
|
)
|
|
}
|