import { downloadDir } from '@tauri-apps/api/path'; import { download } from 'tauri-plugin-upload-api'; import { DownloadIcon } from '@shared/icons'; import { Image } from '@shared/image'; export function ImagePreview({ urls, truncate }: { urls: string[]; truncate?: boolean }) { const downloadImage = async (url: string) => { const downloadDirPath = await downloadDir(); const filename = url.substring(url.lastIndexOf('/') + 1); return await download(url, downloadDirPath + `/${filename}`); }; return (