Skip to content

Commit

Permalink
don't render empty carousels
Browse files Browse the repository at this point in the history
  • Loading branch information
eanders-ms committed Mar 1, 2024
1 parent daf04df commit 4227d64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions teachertool/src/components/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const CardCarousel: React.FC<DataCarouselProps> = ({ title, cardsUrl }) => {

useJsonDocRequest(cardsUrl, setFetchStatus, setCardSet);

return (
return !!cardSet?.cards?.length ? (
<>
<div className={css.carouselRow}>
<div className={css.rowTitle}>
Expand All @@ -210,7 +210,7 @@ const CardCarousel: React.FC<DataCarouselProps> = ({ title, cardsUrl }) => {
)}
</div>
</>
);
) : null;
};

const CardCarousels: React.FC = () => {
Expand Down

0 comments on commit 4227d64

Please sign in to comment.