diff --git a/src/Components/Api/Api.tsx b/src/Components/Api/Api.tsx index e2aa672..e5ec623 100644 --- a/src/Components/Api/Api.tsx +++ b/src/Components/Api/Api.tsx @@ -26,6 +26,19 @@ export function GetNotes() { }); } +export function GetPublicNotes() { + const token = JSON.parse(localStorage.getItem("token") || "{}"); + return instance + .get("/api/v1/public_notes/", { + headers: { + Authorization: "Token " + token, + }, + }) + .then((response) => { + return response.data; + }); +} + export function GetNote(id: number) { const token = JSON.parse(localStorage.getItem("token") || "{}"); return instance diff --git a/src/Components/PublicNote/Note.tsx b/src/Components/PublicNote/Note.tsx new file mode 100644 index 0000000..a1454c9 --- /dev/null +++ b/src/Components/PublicNote/Note.tsx @@ -0,0 +1,25 @@ +import * as React from "react"; +import styles from "../../styles"; +import { NoteProps } from "../../Interfaces/Interfaces"; + +export default function PublicNote(props: NoteProps) { + return ( +
+
+

Owner: {props.owner}

+

Title: {props.title}

+
+