My-Dictionary-React-Application / src / definedResults.js
definedResults.js
Raw
import React from "react";
import "./reactStyling.css";
import AllDefinitions from "./listForDefinitions";

function ResultsHere(response) {
  if (response.info.meanings.length > 0) {
    return (
      <div className="div-of-defintions-from-every-first-array">
        <h5 className="header-5-defintions">
          {response.info.meanings.map(function (meaning, index) {
            return (
              <li key={index} className="li-for-definitions">
                <AllDefinitions info={meaning} />
              </li>
            );
          })}
        </h5>
      </div>
    );
  } else {
    return null;
  }
}

export default ResultsHere;