Skip to content

Commit

Permalink
🐛 Fix: => Edit note from details page not reflecting after UPDATE/DEL…
Browse files Browse the repository at this point in the history
…ETE operation
  • Loading branch information
qridwan committed Jun 2, 2024
1 parent 2a9ea0e commit 07a95d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/NoteDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { formatDate } from '../helpers/dates';
const NoteDetails = () => {
const { id: noteId } = useParams();
const [openedEdit, { close: closeEdit }] = useDisclosure(false);
const { data: note, refetch } = useSinglenoteQuery(noteId as string, { refetchOnMountOrArgChange: true });
const { data: note } = useSinglenoteQuery(noteId as string, { refetchOnMountOrArgChange: true });
const navigate = useNavigate();

const { classes } = useStyles();
Expand Down Expand Up @@ -117,7 +117,7 @@ const NoteDetails = () => {


{/* Edit modal */}
<Modal size="calc(100vw - 60vw)" opened={openedEdit} onClose={refetch} title="" centered>
<Modal size="calc(100vw - 60vw)" opened={openedEdit} onClose={closeEdit} title="" centered>
<EditNote note={note?.data as noteType} close={closeEdit} />
</Modal>

Expand Down

0 comments on commit 07a95d1

Please sign in to comment.