изменила прогрузку данных где была кружка, а также и добавила подчёркивание в футор

This commit is contained in:
xomimishka committed 2025-05-01 01:46:20 +03:00
1 parent 778fd4c8a1
commit b91793e81c
16 files changed
+412 -41

No files matched your search

@@ -13,7 +13,7 @@
font-weight: 600;
line-height: 44px;
margin-top: 0;
margin-bottom: 8px;
margin-bottom: 16px;
@include mediaMax($tablet-max-width) {
font-size: 24px;
+11 -9
View File
@@ -1,5 +1,6 @@
import { useState } from "react";
import { useMedia } from "@/modules/media/hooks/useMedia";
import { SkeletonGallery } from "@/shared/Components/SkeletonGallery/SkeletonGallery";
import "./PhotoGallery.style.scss"
@@ -14,16 +15,19 @@ const PhotoGallery = ({ images }: PhotoGalleryProps) => {
const filteredMedia = images
? images.map((src, id) => ({ id, src }))
: mediaData || []; // без фильтра
: mediaData || [];
if (isLoading)
if (isLoading) {
return (
<div className="mainContainer">
<span className="loader"></span>
<div>
<SkeletonGallery />
</div>
);
}
if (isError) return <div>Ошибка при загрузке медиа</div>;
if (isError || !filteredMedia || filteredMedia.length === 0) {
return <center>Ошибка при загрузке медиа</center>;
}
return (
<div className="mainContainer">
@@ -39,12 +43,10 @@ const PhotoGallery = ({ images }: PhotoGalleryProps) => {
</div>
))}
</div>
<div className="btn">
Загрузить ещё
</div>
<div className="btn">Загрузить ещё</div>
</div>
);
};
export default PhotoGallery;