dapoadedire / astro-pic-of-the-day

Found unnecessary fragments JS-0424
Anti-pattern
Major
1 occurrence in this check
Fragments should contain more than one child - otherwise, there’s no need for a Fragment at all
17  const data = results.data;
18
19  return (
20    <>21      22        <div>23          <div className="picture">24            <h2>Astromomy Picture Of The Day</h2>25            <figure>26              {data.media_type === "video" ? (27                <iframe src={data.url} title="a">28                  {data.title}29                </iframe>30              ) : (31                <img src={data.url} alt={data.title} />32              )}33              <figcaption>34                {data.copyright && <p>Image Credits and Copyright: {data.copyright}</p>}35                <p className="title">36                  {data.title} - {getReadableDate(data.date)}37                </p>38              </figcaption>39            </figure>404142          </div>4344          <div className="explaination">45            <p>{data.explanation}</p>46          </div>47        </div>48      49     50    </>51  );
52};
53