20 lines
681 B
TypeScript
20 lines
681 B
TypeScript
import { getServerApi } from '@garage/api/server'
|
|
import { CustomerGeneralInfo } from '@/modules/customers/customer-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 customer = await api.customers.getById(id)
|
|
|
|
if (!customer.data) {
|
|
return <div className="text-muted-foreground p-6">Customer not found.</div>
|
|
}
|
|
|
|
return (
|
|
<DashboardPage header={null}>
|
|
<CustomerGeneralInfo customer={customer.data} />
|
|
</DashboardPage>
|
|
)
|
|
}
|