mirror of
https://github.com/lemeow125/React-NotesApp.git
synced 2024-11-16 22:19:27 +08:00
Show owner on note
This commit is contained in:
parent
132dfa496d
commit
2e6c5fbef8
3 changed files with 5 additions and 1 deletions
|
@ -16,7 +16,8 @@ export default function Note(props: NoteProps) {
|
||||||
return (
|
return (
|
||||||
<div style={styles.flex_column}>
|
<div style={styles.flex_column}>
|
||||||
<div style={styles.note}>
|
<div style={styles.note}>
|
||||||
<p style={styles.text_medium}>{props.title}</p>
|
<p style={styles.text_medium}>Owner: {props.owner}</p>
|
||||||
|
<p style={styles.text_medium}>Title: {props.title}</p>
|
||||||
<div style={styles.note_content}>
|
<div style={styles.note_content}>
|
||||||
<p style={styles.text_small}>{props.content}</p>
|
<p style={styles.text_small}>{props.content}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -58,6 +58,7 @@ export default function Notes() {
|
||||||
{notes.map(
|
{notes.map(
|
||||||
(
|
(
|
||||||
note: {
|
note: {
|
||||||
|
owner: string;
|
||||||
title: string;
|
title: string;
|
||||||
content: string;
|
content: string;
|
||||||
id: number;
|
id: number;
|
||||||
|
@ -72,6 +73,7 @@ export default function Notes() {
|
||||||
title={note.title}
|
title={note.title}
|
||||||
content={note.content}
|
content={note.content}
|
||||||
date_created={note.date_created}
|
date_created={note.date_created}
|
||||||
|
owner={note.owner}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ export interface NoteProps {
|
||||||
content: string;
|
content: string;
|
||||||
id: number;
|
id: number;
|
||||||
date_created: string;
|
date_created: string;
|
||||||
|
owner: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IconProps {
|
export interface IconProps {
|
||||||
|
|
Loading…
Reference in a new issue