update preview components

This commit is contained in:
Ren Amamiya
2023-04-24 17:54:12 +07:00
parent 188c052a1a
commit f0d0e79e3d
13 changed files with 237 additions and 184 deletions

View File

@@ -1,9 +1,7 @@
import { memo } from 'react';
export const ImagePreview = memo(function ImagePreview({ url, size }: { url: string; size: string }) {
export const ImagePreview = ({ url, size }: { url: string; size: string }) => {
return (
<div className={`relative h-full ${size === 'large' ? 'w-4/5' : 'w-1/2'} mt-2 rounded-lg border border-zinc-800`}>
<img src={url} alt={url} className="h-auto w-full rounded-lg object-cover" loading="lazy" fetchpriority="high" />
<img src={url} alt={url} className="h-auto w-full rounded-lg object-cover" loading="lazy" />
</div>
);
});
};