Fail to restore unsaved memo resource list
Describe the bug
When adding a new memo with unsaved content and a resource attached:
-
If you do not save the memo and then refresh the page or navigate away and return, the memo text is restored correctly.
-
However, the attached resource is not restored.
-
The resource does appear on the Resources page under "Unsaved Resources", indicating it was uploaded.
-
The issue is that the memo loses its link to the resource upon refresh, even though the resource itself still exists.
Same thing happens when you try to edit an existing memo but do not save or cancel, then refresh the page and edit the same memo again the unsaved content is restored, but the resource list is not.
Steps to reproduce
- Add new memo and attach a resource
- Do not save the memo
- Refresh the page
The version of Memos you're using
v0.24.3
Screenshots or additional context
https://github.com/user-attachments/assets/4649446c-eb88-4468-872a-6009e69a41d0
Can we just switch to using useLocalStorage() instead of useState() for storing State object?? This wil fix the issue.