doc: added downloadImage function
This commit is contained in:
1 parent
2fd5641695
commit
8168ee7c0b
1 file changed
+5
@@ -1,3 +1,4 @@
|
||||
import FileSaver from "file-saver";
|
||||
import { surpriseMePrompts } from "../constants";
|
||||
|
||||
export function getRandomPrompt(prompt) {
|
||||
@@ -8,3 +9,7 @@ export function getRandomPrompt(prompt) {
|
||||
|
||||
return randomPrompt;
|
||||
}
|
||||
|
||||
export async function downloadImage(_id, photo) {
|
||||
FileSaver.saveAs(photo, `download-${_id}.jpg`);
|
||||
}
|
||||
Reference in new issue
Block a user