text: import React, { memo } from "react";
  import PropTypes from "prop-types";
  import { Switch } from "react-router-dom";
  import PropsRoute from "../../shared/components/PropsRoute";
  import Home from "./home/Home";
  import Blog from "./blog/Blog";
  
  function Routing(props) {
    const { blogPosts, selectBlog, selectHome } = props;
    return (
      <Switch>
        <PropsRoute
          exact
          path="/blog"
          component={Blog}
          selectBlog={selectBlog}
          blogPosts={blogPosts}
        />
        )
        <PropsRoute path="/" component={Home} selectHome={selectHome} />)
      </Switch>
    );
  }
  
  Routing.propTypes = {
    blogposts: PropTypes.arrayOf(PropTypes.object),
    selectHome: PropTypes.func.isRequired,
    selectBlog: PropTypes.func.isRequired
  };
  
  export default memo(Routing);
  