import React from "react"
import { Image } from "antd"
const Preview = ({ isPreview, setIsPreview }: any) => {

  return <Image
    width={0}
    style={{ display: 'none' }}
    src={isPreview}
    rootClassName="preview_img"
    preview={{
      visible: isPreview,
      src: isPreview,
      onVisibleChange: (value) => {
        setIsPreview(value);
      },
    }}
  />
}

export default Preview