import { useEditor, getSvgAsImage, useToasts, createShapeId, } from '@tldraw/tldraw' import { useState } from 'react' import { PreviewShape } from '../PreviewShape/PreviewShape' export function ExportButton() { const editor = useEditor() const [loading, setLoading] = useState(false) const toast = useToasts() // A tailwind styled button that is pinned to the bottom right of the screen return ( ) } export function blobToBase64(blob: Blob) { return new Promise((resolve, _) => { const reader = new FileReader() reader.onloadend = () => resolve(reader.result) reader.readAsDataURL(blob) }) }