feat: order form page (#8)
This commit is contained in:
parent
93adc1fb7d
commit
77ea7d301e
@ -1,21 +1,32 @@
|
|||||||
import React from 'react';
|
import React, { FC } from 'react';
|
||||||
import { Link as RouterLink } from 'react-router-dom';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button } from '@chakra-ui/react';
|
import { Container, Heading, VStack } from '@chakra-ui/react';
|
||||||
|
|
||||||
import { URLs } from '../../__data__/urls';
|
import { LandingThemeProvider } from '../../containers';
|
||||||
import { mockOrder } from '../../mocks/landing';
|
import { OrderForm } from '../../components/order-form';
|
||||||
|
|
||||||
|
const Page: FC = () => {
|
||||||
|
const { t } = useTranslation('~', {
|
||||||
|
keyPrefix: 'dry-wash.order-create',
|
||||||
|
});
|
||||||
|
|
||||||
const Page = () => {
|
|
||||||
return (
|
return (
|
||||||
<>
|
<LandingThemeProvider>
|
||||||
<h1>Order form</h1>
|
<Container
|
||||||
{mockOrder.orders.map(({ id }) => (
|
w='full'
|
||||||
<Button key={id} as={RouterLink} to={URLs.orderView.getUrl(id)}>
|
maxWidth='container.xl'
|
||||||
Посмотреть заказ {id}
|
minH='100vh'
|
||||||
</Button>
|
padding={0}
|
||||||
))}
|
bg='white'
|
||||||
</>
|
centerContent
|
||||||
|
>
|
||||||
|
<VStack w='full' h='full' alignItems='stretch' flexGrow={1}>
|
||||||
|
<Heading textAlign='center' mt={4}>{t('title')}</Heading>
|
||||||
|
<OrderForm />
|
||||||
|
</VStack>
|
||||||
|
</Container>
|
||||||
|
</LandingThemeProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Page;
|
export default Page;
|
Loading…
Reference in New Issue
Block a user