import { isNumber, NodeViewProps, NodeViewWrapper } from '@tiptap/react' import { useMemo } from 'react' import { useImageLoad } from '../../../hooks/use-image-load' import { cn } from '@/lib/utils' const ImageViewBlock = ({ editor, node, getPos }: NodeViewProps) => { const imgSize = useImageLoad(node.attrs.src) const paddingBottom = useMemo(() => { if (!imgSize.width || !imgSize.height) { return 0 } return (imgSize.height / imgSize.width) * 100 }, [imgSize.width, imgSize.height]) return (
{node.attrs.alt}
) } export { ImageViewBlock }