diff --git a/client/src/components/world_selection_menu.tsx b/client/src/components/world_selection_menu.tsx index 11a30da..a2a2ae8 100644 --- a/client/src/components/world_selection_menu.tsx +++ b/client/src/components/world_selection_menu.tsx @@ -81,7 +81,7 @@ export function WorldSelectionMenu() { const downloadProgress = (e) => { e.preventDefault() downloadFile({ - data: JSON.stringify(gameProgress), + data: JSON.stringify(gameProgress, null, 2), fileName: `lean4game-${gameId}-${new Date().toLocaleDateString()}.json`, fileType: 'text/json', }) diff --git a/client/src/state/local_storage.ts b/client/src/state/local_storage.ts index 194709e..38c0448 100644 --- a/client/src/state/local_storage.ts +++ b/client/src/state/local_storage.ts @@ -25,7 +25,7 @@ export function loadState() { /** Save to browser storage */ export async function saveState(state: any) { try { - const serializedState = JSON.stringify(state); + const serializedState = JSON.stringify(state) localStorage.setItem(KEY, serializedState); } catch (e) { // Ignore