- 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.
25 lines
807 B
TypeScript
25 lines
807 B
TypeScript
import { Container } from '@/components/layout';
|
|
import { PageHeader } from '@/components/navigation';
|
|
import { SlotButtons, SlotDateTime, SlotOrdersList } from '@/components/schedule';
|
|
import { type SlotPageParameters } from '@/components/schedule/types';
|
|
import { BookButton } from '@/components/shared/book-button';
|
|
|
|
type Props = { params: Promise<SlotPageParameters> };
|
|
|
|
export default async function SlotPage(props: Readonly<Props>) {
|
|
const parameters = await props.params;
|
|
|
|
return (
|
|
<>
|
|
<PageHeader title="Слот" />
|
|
<Container>
|
|
<SlotDateTime {...parameters} />
|
|
<SlotOrdersList {...parameters} />
|
|
<BookButton label="Создать запись" />
|
|
<div className="pb-24" />
|
|
<SlotButtons {...parameters} />
|
|
</Container>
|
|
</>
|
|
);
|
|
}
|