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:
@@ -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)}
|
||||
|
||||
1
browser/main/TopBar/.#index.js
Symbolic link
1
browser/main/TopBar/.#index.js
Symbolic link
@@ -0,0 +1 @@
|
||||
suzuki@suzuki-no-MacBook-Air-2.local.31032
|
||||
@@ -65,6 +65,7 @@ ReactDOM.render((
|
||||
<Route path='starred' />
|
||||
<Route path='searched' />
|
||||
<Route path='trashed' />
|
||||
<Route path='tag' />
|
||||
<Route path='storages'>
|
||||
<IndexRedirect to='/home' />
|
||||
<Route path=':storageKey'>
|
||||
|
||||
Reference in New Issue
Block a user