mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
use arrow functions
This commit is contained in:
@@ -145,13 +145,12 @@ class SideNav extends React.Component {
|
|||||||
|
|
||||||
tagListComponent () {
|
tagListComponent () {
|
||||||
const { data, location, config } = this.props
|
const { data, location, config } = this.props
|
||||||
let tagList = _.sortBy(data.tagNoteMap.map((tag, name) => {
|
let tagList = _.sortBy(data.tagNoteMap.map(
|
||||||
return { name, size: tag.size }
|
(tag, name) => ({name, size: tag.size})),
|
||||||
}), ['name'])
|
['name']
|
||||||
|
)
|
||||||
if (config.sortTagsBy === 'COUNTER') {
|
if (config.sortTagsBy === 'COUNTER') {
|
||||||
tagList = _.sortBy(tagList, function (item) {
|
tagList = _.sortBy(tagList, item => (0 - item.size))
|
||||||
return 0 - item.size
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
tagList.map(tag => {
|
tagList.map(tag => {
|
||||||
|
|||||||
Reference in New Issue
Block a user