Skip to content

Notes Disappear on Page Refresh #74

@annrose2277-glitch

Description

@annrose2277-glitch

Describe the bug
When the app initializes, it attempts to load your saved notes from LocalStorage using the key "ultimateNotes". However, when you create or edit a note, the saveNotes() function saves the data to a completely different key: "notestackNotes". Because of this mismatch, your notes are never loaded when the page refreshes.

To Reproduce
/* BEFORE */
function saveNotes() {
localStorage.setItem("notestackNotes", JSON.stringify(notes));
}

/* AFTER */
function saveNotes() {
localStorage.setItem("ultimateNotes", JSON.stringify(notes));
}

Expected behavior
Your notes will now properly save and persist. If you add a note and hit refresh, the note will still be there.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions