diff --git a/src/Components/Note/Note.tsx b/src/Components/Note/Note.tsx index 59003e7..b382b84 100644 --- a/src/Components/Note/Note.tsx +++ b/src/Components/Note/Note.tsx @@ -13,6 +13,7 @@ export default function Note(props: NoteProps) { mutationFn: DeleteNote, onSuccess: () => { queryClient.invalidateQueries("notes"); + queryClient.invalidateQueries("public_notes"); }, }); return ( @@ -30,6 +31,7 @@ export default function Note(props: NoteProps) {

Timestamp: {String(props.date_created)}

+

Public: {props.public ? "Yes" : "No"}

); } - if (data) { + if (data && note) { return (
@@ -80,6 +82,16 @@ export default function ViewNote() { }} />
+
+

Public Note?

+ { + setNote({ ...note, public: !note.public }); + }} + /> +