mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 04:39:45 +00:00
Фикс фотогалереи в "о нас"
This commit is contained in:
1 parent
037ff04d49
commit
759d9edb31
2 files changed
+5
-12
No files matched your search
@@ -4,8 +4,8 @@ import PhotoGallery from "@/widgets/PhotoGallery";
|
|||||||
|
|
||||||
export default function AboutUs() {
|
export default function AboutUs() {
|
||||||
return <>
|
return <>
|
||||||
<CategoryPage category="aboutus" />
|
<CategoryPage category="aboutus" />
|
||||||
<Team />
|
<Team />
|
||||||
<PhotoGallery />
|
<PhotoGallery />
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
@@ -4,18 +4,11 @@ import { SkeletonGallery } from "@/shared/Components/SkeletonGallery/SkeletonGal
|
|||||||
|
|
||||||
import "./PhotoGallery.style.scss"
|
import "./PhotoGallery.style.scss"
|
||||||
|
|
||||||
interface PhotoGalleryProps {
|
const PhotoGallery = () => {
|
||||||
images?: string[];
|
|
||||||
category?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const PhotoGallery = ({ images }: PhotoGalleryProps) => {
|
|
||||||
const { data: mediaData, isLoading, isError } = useMedia();
|
const { data: mediaData, isLoading, isError } = useMedia();
|
||||||
const [visibleCount] = useState(10);
|
const [visibleCount] = useState(10);
|
||||||
|
|
||||||
const filteredMedia = images
|
const filteredMedia = mediaData?.filter((el) => el.category === "gallery") || [];
|
||||||
? images.map((src, id) => ({ id, src }))
|
|
||||||
: mediaData || [];
|
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in new issue
Block a user