merged messageImage preview to image preview
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import Image from 'next/image';
|
||||
import { memo } from 'react';
|
||||
|
||||
export const ImagePreview = memo(function ImagePreview({ url }: { url: string }) {
|
||||
export const ImagePreview = memo(function ImagePreview({ url, size }: { url: string; size: string }) {
|
||||
return (
|
||||
<div className="relative mb-2 mt-3 h-full w-full rounded-lg border border-zinc-800 xl:w-2/3">
|
||||
<div
|
||||
className={`relative h-full ${size === 'large' ? 'w-full' : 'w-2/3'} rounded-lg border border-zinc-800 xl:w-2/3`}
|
||||
>
|
||||
<Image
|
||||
src={url}
|
||||
alt={url}
|
||||
|
||||
Reference in New Issue
Block a user