What
Add a button on the Statistics page to export typing history and performance data as CSV or JSON.
Why
Users who want to track their progress externally (spreadsheets, personal dashboards) need a way to export their data.
How
- Look at
src/pages/StatisticsPage.ts for the current stats display
- Add an "Export" button to the page
- Collect data from
StorageService (sessions, WPM history, accuracy)
- Format as CSV or JSON
- Trigger a browser download using
Blob + URL.createObjectURL
Example:
const blob = new Blob([csvContent], { type: 'text/csv' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'keyboardwriter-stats.csv';
a.click();
What
Add a button on the Statistics page to export typing history and performance data as CSV or JSON.
Why
Users who want to track their progress externally (spreadsheets, personal dashboards) need a way to export their data.
How
src/pages/StatisticsPage.tsfor the current stats displayStorageService(sessions, WPM history, accuracy)Blob+URL.createObjectURLExample: