Skip to content

Commit

Permalink
Merge pull request #1464 from ecency/feature/proxy-3speak-thumbs
Browse files Browse the repository at this point in the history
3speak: added thumbs proxy in a gallery
  • Loading branch information
feruzm authored Sep 12, 2023
2 parents 2109a3f + e09ee00 commit 4cd70ee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/common/components/video-gallery/video-gallery-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { dateToFullRelative } from "../../helper/parse-date";
import React, { useEffect, useState } from "react";
import { ThreeSpeakVideo, useThreeSpeakVideo } from "../../api/threespeak";
import { Button } from "react-bootstrap";
import { proxifyImageSrc } from "@ecency/render-helper";
import { useMappedStore } from "../../store/use-mapped-store";

interface videoProps {
status: string;
Expand All @@ -30,6 +32,7 @@ export function VideoGalleryItem({
setShowGallery,
setVideoMetadata
}: Props) {
const { global } = useMappedStore();
const { data } = useThreeSpeakVideo("all");

const [showMoreInfo, setShowMoreInfo] = useState(false);
Expand Down Expand Up @@ -125,7 +128,10 @@ export function VideoGalleryItem({
return (
<div className="video-list-body">
<div className="thumnail-wrapper">
<img src={item.thumbUrl} alt="" />
<img
src={proxifyImageSrc(item.thumbUrl, 600, 500, global.canUseWebp ? "webp" : "match")}
alt=""
/>
</div>
<div className="list-details-wrapper">
<div className="list-title">
Expand Down

0 comments on commit 4cd70ee

Please sign in to comment.