Skip to content

Commit

Permalink
fix(client): add id information for hash (pagination) (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
junglesub authored Oct 29, 2024
1 parent 2f444b9 commit 47e46f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/front/src/components/FeedCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default function FeedCard({ loading, item, watchSeen = false }) {
subheader={formatTimestamp(item.createdAt)}
/>
<CardMedia sx={{ width: "100%" }}>
{item.files && <FeedCardGallery images={item.files} />}
{item.files && <FeedCardGallery images={item.files} id={item.id} />}
</CardMedia>
<CardContent
sx={{
Expand Down
4 changes: 2 additions & 2 deletions src/main/front/src/components/FeedCardGallery.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { getExtensionFromUrl, isImage, isVideo } from "../tools/tools";
import "photoswipe/dist/photoswipe.css";
import FeedCardImageItem from "./FeedCardImageItem";

const FeedCardGallery = ({ images = [] }) => {
const FeedCardGallery = ({ images = [], id }) => {
const filteredImages = images.filter((url) => isImage(url) || isVideo(url));
if (filteredImages.length === 0) return <></>;
return (
<div className="FeedCardGallery">
<Gallery withDownloadButton>
<Gallery withDownloadButton id={id}>
<FeedCardGalleryContent
images={images}
filteredImages={filteredImages}
Expand Down

0 comments on commit 47e46f7

Please sign in to comment.