mirror of
https://github.com/artegoser/AnoPaper.git
synced 2025-02-23 12:43:14 +03:00
fix: note ids
This commit is contained in:
parent
cbc1e65fa1
commit
0f25c8173b
2 changed files with 3 additions and 4 deletions
|
@ -26,12 +26,11 @@ function Save() {
|
|||
if (!name || !text) return <Navigate to={`/notes`} replace={true} />;
|
||||
|
||||
let notesObj = localStorage.getObj("Notes");
|
||||
let id = Object.keys(notesObj).length;
|
||||
|
||||
let time = Date.now();
|
||||
|
||||
notesObj[id] = {
|
||||
id,
|
||||
notesObj[time] = {
|
||||
id: time,
|
||||
name,
|
||||
text,
|
||||
time,
|
||||
|
|
Loading…
Add table
Reference in a new issue