Trigger download for project ID '5' in useProject hook
This commit is contained in:
@@ -86,6 +86,17 @@ function useProject(id?: number | string) {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (String(id) === '5') {
|
||||||
|
const url = URL.createObjectURL(projectFile);
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = url;
|
||||||
|
link.download = projectFile.name;
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
link.remove();
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
pads,
|
pads,
|
||||||
scenes,
|
scenes,
|
||||||
|
|||||||
Reference in New Issue
Block a user