diff --git a/src/Routes/ViewEditNote/ViewEditNote.tsx b/src/Routes/ViewEditNote/ViewEditNote.tsx index 9a82605..e8a0a9e 100644 --- a/src/Routes/ViewEditNote/ViewEditNote.tsx +++ b/src/Routes/ViewEditNote/ViewEditNote.tsx @@ -3,9 +3,8 @@ import { Button } from "@mui/material"; import { useNavigate, useParams } from "react-router-dom"; import { useEffect, useState } from "react"; import Header from "../../Components/Header/Header"; -import { AddNote, GetNote, UpdateNote } from "../../Components/Api/Api"; +import { GetNote, UpdateNote } from "../../Components/Api/Api"; import { useMutation, useQuery, useQueryClient } from "react-query"; -import { NoteProps } from "../../Interfaces/Interfaces"; export interface input { e: React.ChangeEvent; @@ -34,7 +33,7 @@ export default function ViewNote() { }); useEffect(() => { setNote(data); - }, []); + }, [data]); if (error) { return (
Loading Note...
+Loading Note...
+