text: import React from 'react';
  // TODO: Add code to import necessary component for creating internal hyperlinks
  import { Link } from 'react-router-dom';
  
  const ThoughtList = ({ thoughts, title }) => {
    if (!thoughts.length) {
      return <h3>No Thoughts Yet</h3>;
    }
  
    return (
      <div>
        <h3>{title}</h3>
        {thoughts &&
          thoughts.map((thought) => (
            <div key={thought._id} className="card mb-3">
              <h4 className="card-header bg-primary text-light p-2 m-0">
                {thought.thoughtAuthor} <br />
                <span style={{ fontSize: '1rem' }}>
                  took this note on {thought.createdAt}
                </span>
              </h4>
              <div className="card-body bg-light p-2">
                <p>{thought.thoughtText}</p>
              </div>
              {/* TODO: Add code to create a link to this thought's single thought page at `/thoughts/<id>` */}
              <Link to={`/thoughts/${thought._id}`}>Go to Note</Link> 
            </div>
          ))}
      </div>
    );
  };
  
  export default ThoughtList;
  