mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
add the tag to routing
This commit is contained in:
@@ -38,6 +38,18 @@ class SideNav extends React.Component {
|
|||||||
router.push('/trashed')
|
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 () {
|
render () {
|
||||||
let { data, location, config, dispatch } = this.props
|
let { data, location, config, dispatch } = this.props
|
||||||
|
|
||||||
@@ -64,6 +76,10 @@ class SideNav extends React.Component {
|
|||||||
tabIndex='1'
|
tabIndex='1'
|
||||||
style={style}
|
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'>
|
<div styleName='top'>
|
||||||
<button styleName='top-menu'
|
<button styleName='top-menu'
|
||||||
onClick={(e) => this.handleMenuButtonClick(e)}
|
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='starred' />
|
||||||
<Route path='searched' />
|
<Route path='searched' />
|
||||||
<Route path='trashed' />
|
<Route path='trashed' />
|
||||||
|
<Route path='tag' />
|
||||||
<Route path='storages'>
|
<Route path='storages'>
|
||||||
<IndexRedirect to='/home' />
|
<IndexRedirect to='/home' />
|
||||||
<Route path=':storageKey'>
|
<Route path=':storageKey'>
|
||||||
|
|||||||
Reference in New Issue
Block a user