diff --git a/src/Components/Api/Api.tsx b/src/Components/Api/Api.tsx index 947730c..4a71e0e 100644 --- a/src/Components/Api/Api.tsx +++ b/src/Components/Api/Api.tsx @@ -1,7 +1,9 @@ +import axios from "axios"; +import { get } from "http"; + export function GetNotes() { return fetch("http://localhost:8000/api/v1/notes/").then((res) => { - const result = res.json(); - console.log(); - return result; + console.log(res); + return res.json(); }); } diff --git a/src/Components/Note/Note.tsx b/src/Components/Note/Note.tsx index 6c75755..f61403c 100644 --- a/src/Components/Note/Note.tsx +++ b/src/Components/Note/Note.tsx @@ -2,6 +2,7 @@ import * as React from "react"; import styles from "../../styles"; import { Button } from "@mui/material"; import axios from "axios"; +import { useQueryClient } from "react-query"; export interface props { title: string; @@ -10,6 +11,7 @@ export interface props { date_created: string; } export default function Note(props: props) { + const queryClient = useQueryClient(); return (