mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Star a note
This commit is contained in:
@@ -136,6 +136,21 @@ class NoteList extends React.Component {
|
||||
}, [])
|
||||
}
|
||||
|
||||
if (location.pathname.match(/\/starred/)) {
|
||||
return repositories
|
||||
.reduce((sum, repository) => {
|
||||
return sum.concat(repository.starred
|
||||
.map((starredKey) => {
|
||||
return _.find(repository.notes, {key: starredKey})
|
||||
})
|
||||
.filter((note) => _.isObject(note))
|
||||
.map((note) => {
|
||||
note._repository = repository
|
||||
return note
|
||||
}))
|
||||
}, [])
|
||||
}
|
||||
|
||||
let repository = _.find(repositories, {key: repositoryKey})
|
||||
if (repository == null) return []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user