Created
February 4, 2025 12:27
-
-
Save nataliaconde/b1f013ec32b0a843464bcb21638e5fb0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Journal.tsx */ | |
const deleteJournal = async (id) => { | |
try { | |
const Journal = Parse.Object.extend("Journal"); | |
const result = new Journal(); | |
result.id = id; | |
await result.destroy(); | |
const newJournals = journal.filter((item) => item.id !== id); | |
setJournal(newJournals); | |
} catch (error) { | |
console.log(error); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment