Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

3speak: added thumbs proxy in a gallery #1464

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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