1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

some rename plural form or easy to understand

This commit is contained in:
Sosuke Suzuki
2017-10-03 03:03:33 +09:00
parent e300b33a4f
commit 4689ddeb98
2 changed files with 9 additions and 9 deletions

View File

@@ -7,12 +7,12 @@ import CSSModules from 'browser/lib/CSSModules'
/** /**
* @param {string} name * @param {string} name
* @param {Function} handleClickTagButton * @param {Function} handleClickTagListItem
*/ */
const TagListItem = ({name, handleClickTagButton}) => { const TagListItem = ({name, handleClickTagListItem}) => {
return ( return (
<button styleName='tagList-item' onClick={(e) => handleClickTagButton(e, name)}> <button styleName='tagList-item' onClick={(e) => handleClickTagListItem(e, name)}>
<span styleName='tagList-item-name'> <span styleName='tagList-item-name'>
{`# ${name}`} {`# ${name}`}
</span> </span>

View File

@@ -39,12 +39,12 @@ class SideNav extends React.Component {
router.push('/trashed') router.push('/trashed')
} }
handleSwitchFolderButtonClick (e) { handleSwitchFoldersButtonClick (e) {
let { router } = this.context let { router } = this.context
router.push('/home') router.push('/home')
} }
handleSwitchTagButtonClick (e) { handleSwitchTagsButtonClick (e) {
let { router } = this.context let { router } = this.context
router.push('/alltags') router.push('/alltags')
} }
@@ -104,7 +104,7 @@ class SideNav extends React.Component {
tagList.map(tag => { tagList.map(tag => {
return (<TagListItem return (<TagListItem
name={tag} name={tag}
handleClickTagButton={this.handleClickTagButton.bind(this)} handleClickTagListItem={this.handleClickTagListItem.bind(this)}
key={tag} key={tag}
/> />
) )
@@ -112,7 +112,7 @@ class SideNav extends React.Component {
) )
} }
handleClickTagButton (e, name) { handleClickTagListItem (e, name) {
let { router } = this.context let { router } = this.context
router.push(`/tags/${name}`) router.push(`/tags/${name}`)
} }
@@ -145,8 +145,8 @@ class SideNav extends React.Component {
> >
<div styleName='top'> <div styleName='top'>
<div styleName='switch-buttons'> <div styleName='switch-buttons'>
<button styleName={location.pathname.match(/tag/) ? 'non-active-button' : 'active-button'} onClick={(e) => this.handleSwitchFolderButtonClick(e)}>Folder</button> <button styleName={location.pathname.match(/tag/) ? 'non-active-button' : 'active-button'} onClick={(e) => this.handleSwitchFoldersButtonClick(e)}>Folders</button>
<button styleName={location.pathname.match(/tag/) ? 'active-button' : 'non-active-button'} onClick={(e) => this.handleSwitchTagButtonClick(e)}>Tags</button> <button styleName={location.pathname.match(/tag/) ? 'active-button' : 'non-active-button'} onClick={(e) => this.handleSwitchTagsButtonClick(e)}>Tags</button>
</div> </div>
<button styleName='top-menu' <button styleName='top-menu'
onClick={(e) => this.handleMenuButtonClick(e)} onClick={(e) => this.handleMenuButtonClick(e)}