1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 18:56:22 +00:00

fix bug : isTrashedActive and isStarredActive are inverted

This commit is contained in:
Sosuke Suzuki
2017-10-10 00:02:42 +09:00
parent 3c4fa83161
commit 9b60814292

View File

@@ -51,8 +51,13 @@ class SideNav extends React.Component {
router.push('/alltags') router.push('/alltags')
} }
SideNavComponent (isFolded, isHomeActive, isStarredActive, isTrashedActive, storageList) { SideNavComponent (isFolded, storageList) {
let { location, data } = this.props let { location, data } = this.props
const isHomeActive = !!location.pathname.match(/^\/home$/)
const isStarredActive = !!location.pathname.match(/^\/starred$/)
const isTrashedActive = !!location.pathname.match(/^\/trashed$/)
let component let component
// TagsMode is not selected // TagsMode is not selected
@@ -114,9 +119,6 @@ class SideNav extends React.Component {
let { data, location, config, dispatch } = this.props let { data, location, config, dispatch } = this.props
let isFolded = config.isSideNavFolded let isFolded = config.isSideNavFolded
let isHomeActive = !!location.pathname.match(/^\/home$/)
let isStarredActive = !!location.pathname.match(/^\/starred$/)
let isTrashedActive = !!location.pathname.match(/^\/trashed$/)
let storageList = data.storageMap.map((storage, key) => { let storageList = data.storageMap.map((storage, key) => {
return <StorageItem return <StorageItem
@@ -148,7 +150,7 @@ class SideNav extends React.Component {
<i className='fa fa-wrench fa-fw' /> <i className='fa fa-wrench fa-fw' />
</button> </button>
</div> </div>
{this.SideNavComponent(isFolded, isHomeActive, isTrashedActive, isStarredActive, storageList)} {this.SideNavComponent(isFolded, storageList)}
</div> </div>
) )
} }