File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 1
1
import React , { useEffect } from "react" ;
2
2
import "./NotesList.css" ;
3
3
import { useSelector } from "react-redux" ;
4
+ import { Link } from "react-router-dom" ;
4
5
import {
5
6
selectAllNotes ,
6
7
selectNoteError ,
7
8
selectNoteStatus ,
8
9
} from "../../features/notes/notesSlice" ;
9
- import NoteItem from "./NoteItem " ;
10
+ import NoteCard from "./NoteCard " ;
10
11
11
12
function NotesList ( ) {
12
13
// Get all notes from the redux store
@@ -54,12 +55,13 @@ function NotesList() {
54
55
// showDate = `${day}/${month}/${year}`;
55
56
56
57
return (
57
- < NoteItem
58
- key = { note . _id }
59
- note = { note }
60
- // showTitle={showTitle}
61
- // showDate={showDate}
62
- />
58
+ < Link to = { `/note/${ note . _id } ` } key = { note . _id } >
59
+ < NoteCard
60
+ note = { note }
61
+ // showTitle={showTitle}
62
+ // showDate={showDate}
63
+ />
64
+ </ Link >
63
65
) ;
64
66
} ) }
65
67
</ div >
You can’t perform that action at this time.
0 commit comments