initial commit
This commit is contained in:
33
app/home/(user)/(dashboard)/booking/[handle]/page.tsx
Normal file
33
app/home/(user)/(dashboard)/booking/[handle]/page.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { use } from 'react';
|
||||
|
||||
import { PageBody } from '@kit/ui/page';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
|
||||
import { withI18n } from '~/lib/i18n/with-i18n';
|
||||
|
||||
import { HomeLayoutPageHeader } from '../../../_components/home-page-header';
|
||||
|
||||
export const generateMetadata = async () => {
|
||||
const i18n = await createI18nServerInstance();
|
||||
const title = i18n.t('booking:title');
|
||||
|
||||
return {
|
||||
title,
|
||||
};
|
||||
};
|
||||
|
||||
function BookingHandlePage() {
|
||||
return (
|
||||
<>
|
||||
<HomeLayoutPageHeader
|
||||
title={<Trans i18nKey={'booking:title'} />}
|
||||
description={<Trans i18nKey={'booking:description'} />}
|
||||
/>
|
||||
|
||||
<PageBody></PageBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default withI18n(BookingHandlePage);
|
||||
@@ -1,12 +1,15 @@
|
||||
import { use } from 'react';
|
||||
|
||||
import { PageBody } from '@kit/ui/page';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
|
||||
import { withI18n } from '~/lib/i18n/with-i18n';
|
||||
|
||||
|
||||
import { HomeLayoutPageHeader } from '../../_components/home-page-header';
|
||||
import OrderCards from '../../_components/order-cards';
|
||||
import ServiceCategories from '../../_components/service-categories';
|
||||
import { loadTtoServices } from '../../_lib/server/load-tto-services';
|
||||
|
||||
export const generateMetadata = async () => {
|
||||
const i18n = await createI18nServerInstance();
|
||||
@@ -18,6 +21,8 @@ export const generateMetadata = async () => {
|
||||
};
|
||||
|
||||
function BookingPage() {
|
||||
const { heroCategories, ttoCategories } = use(loadTtoServices());
|
||||
console.log('ttoCategories', heroCategories, ttoCategories);
|
||||
return (
|
||||
<>
|
||||
<HomeLayoutPageHeader
|
||||
@@ -26,7 +31,8 @@ function BookingPage() {
|
||||
/>
|
||||
|
||||
<PageBody>
|
||||
<OrderCards />
|
||||
<OrderCards heroCategories={heroCategories} />
|
||||
<ServiceCategories categories={ttoCategories} />
|
||||
</PageBody>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user