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

add the tag to routing

This commit is contained in:
Sosuke Suzuki
2017-09-30 14:23:45 +09:00
parent c429fc6b2c
commit 8311030bec
3 changed files with 18 additions and 0 deletions

View File

@@ -38,6 +38,18 @@ class SideNav extends React.Component {
router.push('/trashed')
}
handleSwitchFolderButtonClick (e) {
console.log('SwitchfolderButton Clicked')
let { router } = this.context
router.push('/home')
}
handleSwitchTagButtonClick (e) {
console.log('SwitchTagButton clicked')
let { router } = this.context
router.push('/tag')
}
render () {
let { data, location, config, dispatch } = this.props
@@ -64,6 +76,10 @@ class SideNav extends React.Component {
tabIndex='1'
style={style}
>
<div styleName='SwitchModeButtons'>
<button onClick={(e) => this.handleSwitchFolderButtonClick(e)}>Folder</button>
<button onClick={(e) => this.handleSwitchTagButtonClick(e)}>Tag</button>
</div>
<div styleName='top'>
<button styleName='top-menu'
onClick={(e) => this.handleMenuButtonClick(e)}