@dynamic-labs/sdk-react-core
Version:
A React SDK for implementing wallet web3 authentication and authorization to your website.
12 lines (10 loc) • 339 B
JavaScript
'use client'
const downloadFile = (fileName, content) => {
const element = document.createElement('a');
const file = new Blob([content], { type: 'text/plain' });
element.href = URL.createObjectURL(file);
element.download = fileName;
document.body.appendChild(element);
element.click();
};
export { downloadFile };