From 2e6c5fbef80e761cfdb7828a640a471c97aa63f7 Mon Sep 17 00:00:00 2001 From: keannu125 Date: Thu, 2 Mar 2023 00:43:26 +0800 Subject: [PATCH] Show owner on note --- src/Components/Note/Note.tsx | 3 ++- src/Components/Notes/Notes.tsx | 2 ++ src/Interfaces/Interfaces.tsx | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Components/Note/Note.tsx b/src/Components/Note/Note.tsx index b8bd090..6924a83 100644 --- a/src/Components/Note/Note.tsx +++ b/src/Components/Note/Note.tsx @@ -16,7 +16,8 @@ export default function Note(props: NoteProps) { return (
-

{props.title}

+

Owner: {props.owner}

+

Title: {props.title}

{props.content}

diff --git a/src/Components/Notes/Notes.tsx b/src/Components/Notes/Notes.tsx index e1c2d2a..b275869 100644 --- a/src/Components/Notes/Notes.tsx +++ b/src/Components/Notes/Notes.tsx @@ -58,6 +58,7 @@ export default function Notes() { {notes.map( ( note: { + owner: string; title: string; content: string; id: number; @@ -72,6 +73,7 @@ export default function Notes() { title={note.title} content={note.content} date_created={note.date_created} + owner={note.owner} /> ); } diff --git a/src/Interfaces/Interfaces.tsx b/src/Interfaces/Interfaces.tsx index ea68b14..7ec33f0 100644 --- a/src/Interfaces/Interfaces.tsx +++ b/src/Interfaces/Interfaces.tsx @@ -20,6 +20,7 @@ export interface NoteProps { content: string; id: number; date_created: string; + owner: string; } export interface IconProps {