Фикс фотогалереи в "о нас"

This commit is contained in:
ifraimka1 committed 2025-05-15 18:25:51 +03:00
1 parent 037ff04d49
commit 759d9edb31
2 files changed
+5 -12

No files matched your search

+3 -3
View File
@@ -4,8 +4,8 @@ import PhotoGallery from "@/widgets/PhotoGallery";
export default function AboutUs() {
return <>
<CategoryPage category="aboutus" />
<Team />
<PhotoGallery />
<CategoryPage category="aboutus" />
<Team />
<PhotoGallery />
</>
}
+2 -9
View File
@@ -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 (