another update

This commit is contained in:
2025-07-24 00:48:27 +03:00
parent dfc8e21db1
commit e0217cbbcb
75 changed files with 5331 additions and 4457 deletions

View File

@@ -1,24 +1,23 @@
import React from 'react';
import { useThumbnailURL } from '@/hooks/use-lazy-load';
import { Skeleton } from './ui/skeleton';
import React from "react";
import { useThumbnailURL } from "@/hooks/use-lazy-load";
import { Skeleton } from "./ui/skeleton";
import Image from "next/image";
interface LazyLoadedImageProps {
imgId: string;
alt: string;
[prop: string]: string
[prop: string]: string;
}
const LazyLoadedImage: React.FC<React.ImgHTMLAttributes<HTMLImageElement> & LazyLoadedImageProps> = ({
imgId,
alt,
...props
}) => {
const LazyLoadedImage: React.FC<
LazyLoadedImageProps
> = ({ imgId, alt, ...props }) => {
const imgUrl = useThumbnailURL(imgId);
return (
<div>
{imgUrl ? (
<img src={imgUrl} alt={alt} {...props} />
<Image src={imgUrl as any} width={1024} height={1024} alt={alt} {...props} />
) : (
<Skeleton {...props} />
)}
@@ -26,4 +25,4 @@ const LazyLoadedImage: React.FC<React.ImgHTMLAttributes<HTMLImageElement> & Lazy
);
};
export default LazyLoadedImage;
export default LazyLoadedImage;