- Converted several async components to synchronous functions, including `Layout`, `AddOrdersPage`, `ProfilePage`, `SlotPage`, and `ServicePage`, enhancing rendering efficiency. - Removed unnecessary prefetching logic and hydration boundaries, simplifying component structure and improving maintainability. - Updated the `TelegramProvider` to return null during the initial mount instead of a loading message, streamlining the loading state handling. - Enhanced loading state management in order-related components by adding loading spinners and data not found alerts, improving user experience during data fetching.
21 lines
632 B
TypeScript
21 lines
632 B
TypeScript
import { Container } from '@/components/layout';
|
|
import { PageHeader } from '@/components/navigation';
|
|
import { ServiceButtons, ServiceDataCard } from '@/components/profile/services';
|
|
|
|
// Тип параметров страницы
|
|
type Props = { params: Promise<{ serviceId: string }> };
|
|
|
|
export default async function ProfilePage(props: Readonly<Props>) {
|
|
const { serviceId } = await props.params;
|
|
|
|
return (
|
|
<>
|
|
<PageHeader title="Услуга" />
|
|
<Container className="px-0">
|
|
<ServiceDataCard serviceId={serviceId} />
|
|
<ServiceButtons serviceId={serviceId} />
|
|
</Container>
|
|
</>
|
|
);
|
|
}
|