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 (