ApplicationLayout.tsx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import React from 'react';
  2. import {Navbar, Nav, Form, FormControl, Button} from 'react-bootstrap';
  3. import {Link} from 'found';
  4. import './style';
  5. interface Props {
  6. children?: React.ReactNode;
  7. }
  8. function ApplicationLayout({children}: Props): React.ReactElement {
  9. return (
  10. <div>
  11. <nav>
  12. <Navbar expand='md'>
  13. <Link to='/'>
  14. <Navbar.Brand>Pokemon.trade</Navbar.Brand>
  15. </Link>
  16. <Navbar.Toggle aria-controls='basic-navbar-nav' />
  17. <Navbar.Collapse id='basic-navbar-nav'>
  18. <Nav className='mr-auto'>
  19. <Nav.Link as={Link} to='/pokemon'>
  20. View Pokemon
  21. </Nav.Link>
  22. </Nav>
  23. <Form inline>
  24. <FormControl
  25. className='mr-sm-2'
  26. placeholder='Search'
  27. type='text'
  28. />
  29. <Button variant='primary'>Search</Button>
  30. </Form>
  31. </Navbar.Collapse>
  32. </Navbar>
  33. </nav>
  34. {children}
  35. <p>
  36. <Link to='/pokemon'>Show me the pokemon!</Link>
  37. </p>
  38. <p>
  39. <Link to='/pokemon/create'>Create a pokemon!</Link>
  40. </p>
  41. </div>
  42. );
  43. }
  44. export default ApplicationLayout;