MCPcopy
hub / github.com/ZHO-ZHO-ZHO/Nano-Bananary / handleDownloadFromHistory

Function handleDownloadFromHistory

App.tsx:295–299  ·  view source on GitHub ↗
(url: string, type: string)

Source from the content-addressed store, hash-verified

293 };
294
295 const handleDownloadFromHistory = (url: string, type: string) => {
296 const fileExtension = type.includes('video') ? 'mp4' : (url.split(';')[0].split('/')[1] || 'png');
297 const filename = `${type}-${Date.now()}.${fileExtension}`;
298 downloadImage(url, filename);
299 };
300
301 const handleBackToSelection = () => {
302 setSelectedTransformation(null);

Callers

nothing calls this directly

Calls 1

downloadImageFunction · 0.90

Tested by

no test coverage detected