An array of previously saved sync reports.
export function getSyncHistory(): SyncReport[] {
try {
const storageKey = "anilist_sync_history";
const historyJson = localStorage.getItem(storageKey);
if (!historyJson) {
return [];
}
return JSON.parse(historyJson) as SyncReport[];
} catch (error) {
console.error("Failed to get sync history:", error);
return [];
}
}
Gets sync history from localStorage.