import React from 'react';
import { Link as RouterLink } from 'react-router-dom';
import { Button } from '@chakra-ui/react';

import { URLs } from '../../__data__/urls';
import { mockOrder } from '../../mocks/landing';

const Page = () => {
  return (
    <>
      <h1>Order form</h1>
      {mockOrder.orders.map(({ id }) => (
        <Button key={id} as={RouterLink} to={URLs.orderView.getUrl(id)}>
          Посмотреть заказ {id}
        </Button>
      ))}
    </>
  );
};

export default Page;
