Fixed sheet local storage
This commit is contained in:
@@ -50,19 +50,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function saveRecentSheet(sheet) {
|
||||
// Remove duplicates
|
||||
recentSheets = recentSheets.filter(s => s.id !== sheet.id);
|
||||
recentSheets.unshift(sheet);
|
||||
|
||||
// Limit to 5 recent sheets
|
||||
if (recentSheets.length > 5) {
|
||||
recentSheets.pop();
|
||||
}
|
||||
|
||||
localStorage.setItem(RECENT_SHEETS_KEY, JSON.stringify(recentSheets));
|
||||
}
|
||||
|
||||
function handleSelectSheet(sheet) {
|
||||
const sheetData: SheetInfoType = {
|
||||
id: sheet.id,
|
||||
@@ -270,6 +257,5 @@
|
||||
textBack="Back to Auth"
|
||||
textForwardDisabled="Select a sheet"
|
||||
textForwardEnabled="Continue"
|
||||
onForward={() => saveRecentSheet($selectedSheet)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user