Skip to content

Instantly share code, notes, and snippets.

@nataliaconde
Created February 4, 2025 12:27
Show Gist options
  • Save nataliaconde/b1f013ec32b0a843464bcb21638e5fb0 to your computer and use it in GitHub Desktop.
Save nataliaconde/b1f013ec32b0a843464bcb21638e5fb0 to your computer and use it in GitHub Desktop.
/* 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