1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

add title "tags"

This commit is contained in:
Sosuke Suzuki
2017-09-30 17:27:50 +09:00
parent faede48217
commit 06bd2b2b79

View File

@@ -83,23 +83,31 @@ class SideNav extends React.Component {
</div>
)
} else {
let tagList = data.tagNoteMap.map((tag, key) => {
return key
})
component = (
tagList.map(tag => {
return (
<TagListItem name={tag} handleClickTagButton={this.handleClickTagButton.bind(this)} />
)
})
<div>
<p>Tags</p>
{this.folderListComponent(data)}
</div>
)
}
return component
}
folderListComponent (data) {
let tagList = data.tagNoteMap.map((tag, key) => {
return key
})
return (
tagList.map(tag => {
return (
<TagListItem name={tag} handleClickTagButton={this.handleClickTagButton.bind(this)} />
)
})
)
}
handleClickTagButton (e, name) {
console.log(name)
let { router } = this.context
router.push(`/tags/${name}`)
}