mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 12:43:09 -05:00
Added date to export file name (#580)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import { format } from 'date-fns';
|
||||
|
||||
import { send } from 'loot-core/src/platform/client/fetch';
|
||||
import { Text, Button } from 'loot-design/src/components/common';
|
||||
|
||||
@@ -8,7 +10,11 @@ import { Setting } from './UI';
|
||||
export default function ExportBudget({ prefs }) {
|
||||
async function onExport() {
|
||||
let data = await send('export-budget');
|
||||
window.Actual.saveFile(data, `${prefs.id}.zip`, 'Export budget');
|
||||
window.Actual.saveFile(
|
||||
data,
|
||||
`${format(new Date(), 'yyyy-MM-dd')}-${prefs.id}.zip`,
|
||||
'Export budget'
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user