1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-16 11:15:12 +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> </div>
) )
} else { } else {
let tagList = data.tagNoteMap.map((tag, key) => {
return key
})
component = ( component = (
tagList.map(tag => { <div>
return ( <p>Tags</p>
<TagListItem name={tag} handleClickTagButton={this.handleClickTagButton.bind(this)} /> {this.folderListComponent(data)}
) </div>
})
) )
} }
return component 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) { handleClickTagButton (e, name) {
console.log(name)
let { router } = this.context let { router } = this.context
router.push(`/tags/${name}`) router.push(`/tags/${name}`)
} }