text: import React, { Component } from 'react';
  import axios from "axios";
  
  
  
  export default class PortfolioDetail extends Component {
      constructor(props) {
          super(props);
  
          this.state = {
              portfolioItem: {}
          }
  
          this.getPortfolioItem = this.getPortfolioItem.bind(this);
      }
  
      componentWillMount() {
          this.getPortfolioItem();
      }
  
      getPortfolioItem() {
          axios.get(
              `https://daynebechtold.devcamp.space/portfolio/portfolio_items/${this.props.match.params.slug}`, 
              { withCredentials: true }
          ).then(response => {
              this.setState({
                  portfolioItem: response.data.portfolio_item
              })
          }).catch(error => {
              console.log("getPortfolioItem error", error);
          })
  
      }
  
    render() {
        const {
              banner_image_url,
              category,
              description,
              logo_url,
              name,
              thumb_image_url,
              url
        } = this.state.portfolioItem;
  
        const bannerStyles = {
          backgroundImage: "url(" + banner_image_url + ")",
          backgroundSize: "cover",
          backgroundRepeat: "no-repeat",
          backgroundPosition: "center center",
          backgroundColor: "rgba(52, 52, 52, 0.2)",
          backgroundBlendMode: 'multiply'
        }
  
        const logoStyles = {
            width: "200px",
        }
      return (
          <div className="portfolio-detail-wrapper">
              <div className="banner" style={bannerStyles}>
                  <div className='title-wrapper'>
                      {name}
                  </div>
                  <img src={logo_url} style={logoStyles}/>
              </div>
  
              <div className="portfolio-detail-description-wrapper">
                  <div className="description">{description}</div>
              </div>
  
              <div className="bottom-content-wrapper">
                  <a href={url} className="site-link" target="blank">
                      Visit {name}
                  </a>
              </div>
          </div>
      );
    }
  }