mirror of
https://github.com/lemeow125/React-NotesApp.git
synced 2024-11-17 06:29:28 +08:00
Changed date_created format to Date from String
This commit is contained in:
parent
b3653f5a01
commit
e6b07438d4
3 changed files with 5 additions and 3 deletions
|
@ -25,7 +25,9 @@ export default function Note(props: NoteProps) {
|
||||||
value={props.content}
|
value={props.content}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<p style={styles.text_medium}>Timestamp: {props.date_created}</p>
|
<p style={styles.text_medium}>
|
||||||
|
Timestamp: {String(props.date_created)}
|
||||||
|
</p>
|
||||||
<Button
|
<Button
|
||||||
style={styles.button_red}
|
style={styles.button_red}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
|
|
|
@ -62,7 +62,7 @@ export default function Notes() {
|
||||||
title: string;
|
title: string;
|
||||||
content: string;
|
content: string;
|
||||||
id: number;
|
id: number;
|
||||||
date_created: string;
|
date_created: Date;
|
||||||
},
|
},
|
||||||
index: number
|
index: number
|
||||||
) => {
|
) => {
|
||||||
|
|
|
@ -19,7 +19,7 @@ export interface NoteProps {
|
||||||
title: string;
|
title: string;
|
||||||
content: string;
|
content: string;
|
||||||
id: number;
|
id: number;
|
||||||
date_created: string;
|
date_created: Date;
|
||||||
owner: string;
|
owner: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue