content: import React from 'react';
  import {
      getTrendingStocks
  } from '../services/StockService';
  import CashtagLink from 'stocktwits-react-text-js';
  
  export default class TrendingList extends React.Component {
      constructor(props) {
          super(props);
          this.state = {
              trendingList: []
          };
          getTrendingStocks().then(list => {
              this.setState({
                  trendingList: list
              })
          })
      }
  
      componentDidMount(){
          this.timer = setInterval(function() {
              getTrendingStocks().then(list => {
                  this.setState({
                      trendingList: list
                  })
              })
          }.bind(this), 60000)
      }
  
      componentWillUnmount() {
          clearInterval(this.timer);
      }
  
      render() {
          const {
              getTicker
          } = this.props;
          const {
              trendingList
          } = this.state;
  
          if (trendingList.length) {
              return ( 
                  <div>
                      <div>TRENDING NOW</div>
                      <div className='stocktwits-trending'>
                      {trendingList.map(ticker => {
  
                          return (
                              <span onClick={() => getTicker(ticker.symbol)} className='stocktwits-ticker' title={ticker.title} key={ticker.symbol}>
                                  <CashtagLink text={ticker.symbol} urlTarget='_blank' />
                              </span>
                          );
                      })}
                      </div>
                  </div>
              );
          }
  
          return false;
      }
  }