This commit is contained in:
2025-04-23 20:24:12 +07:00
parent f933b5aad5
commit ef52d632bd
63 changed files with 3911 additions and 138 deletions

View File

@@ -0,0 +1,15 @@
import { BattleDataStateJson } from "@/types/mics";
export const exportBattleData = (
data: BattleDataStateJson,
filename = 'battle_data.json'
) => {
const dataStr = JSON.stringify(data, null, 2);
const blob = new Blob([dataStr], { type: 'application/json' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = filename;
a.click();
URL.revokeObjectURL(url);
};