From 759d9edb311b2df4da3d171e18704443d0e595ef Mon Sep 17 00:00:00 2001 From: ifraimka1 Date: Thu, 15 May 2025 18:25:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=84=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D0=B3=D0=B0=D0=BB=D0=B5=D1=80=D0=B5=D0=B8=20=D0=B2=20"?= =?UTF-8?q?=D0=BE=20=D0=BD=D0=B0=D1=81"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/AboutUs/AboutUs.tsx | 6 +++--- src/widgets/PhotoGallery/PhotoGallery.tsx | 11 ++--------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/pages/AboutUs/AboutUs.tsx b/src/pages/AboutUs/AboutUs.tsx index 1720ae9..8243bc5 100644 --- a/src/pages/AboutUs/AboutUs.tsx +++ b/src/pages/AboutUs/AboutUs.tsx @@ -4,8 +4,8 @@ import PhotoGallery from "@/widgets/PhotoGallery"; export default function AboutUs() { return <> - - - + + + } diff --git a/src/widgets/PhotoGallery/PhotoGallery.tsx b/src/widgets/PhotoGallery/PhotoGallery.tsx index 7535fb3..53dfbf2 100644 --- a/src/widgets/PhotoGallery/PhotoGallery.tsx +++ b/src/widgets/PhotoGallery/PhotoGallery.tsx @@ -4,18 +4,11 @@ import { SkeletonGallery } from "@/shared/Components/SkeletonGallery/SkeletonGal import "./PhotoGallery.style.scss" -interface PhotoGalleryProps { - images?: string[]; - category?: string; -} - -const PhotoGallery = ({ images }: PhotoGalleryProps) => { +const PhotoGallery = () => { const { data: mediaData, isLoading, isError } = useMedia(); const [visibleCount] = useState(10); - const filteredMedia = images - ? images.map((src, id) => ({ id, src })) - : mediaData || []; + const filteredMedia = mediaData?.filter((el) => el.category === "gallery") || []; if (isLoading) { return (