diff --git a/src/widgets/PhotoGallery/PhotoGallery.tsx b/src/widgets/PhotoGallery/PhotoGallery.tsx index 07ab733..465262b 100644 --- a/src/widgets/PhotoGallery/PhotoGallery.tsx +++ b/src/widgets/PhotoGallery/PhotoGallery.tsx @@ -15,7 +15,7 @@ const PhotoGallery = () => { return ; } - if (isError || !galleryImages || galleryImages.length === 0) { + if (isError || !filteredMedia || filteredMedia.length === 0) { return
Ошибка при загрузке медиа
; } @@ -43,7 +43,7 @@ const PhotoGallery = () => {

Фотогалерея

- {galleryImages.slice(0, visibleCount).map((media) => ( + {filteredMedia.slice(0, visibleCount).map((media) => (
{ ))}
- {visibleCount < galleryImages.length && ( + {visibleCount < filteredMedia.length && (
setVisibleCount(visibleCount + 10)}> Загрузить ещё