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
16  const data = results.data;
17
18  return (
19    <>20      <div>21        <div className="picture">22          <h2>Astromomy Picture Of The Day</h2>23          <figure>24            {data.media_type === "video" ? (25              <iframe src={data.url} title="a">26                {data.title}27              </iframe>28            ) : (29              <img src={data.url} alt={data.title} />30            )}31            <figcaption>32              {data.copyright && (33                <p>Image Credits and Copyright: {data.copyright}</p>34              )}35              <p className="title">36                {data.title} - {getReadableDate(data.date)}37              </p>38            </figcaption>39          </figure>40        </div>4142        <div className="explaination">43          <p>{data.explanation}</p>44        </div>45      </div>46    </>47  );
48};
49