Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 92e6076

Browse files
committed
chore: clean up
1 parent ca70e61 commit 92e6076

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

containers/Sidebar/logic.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import R from 'ramda'
2-
import Router from 'next/router'
32
/* import store from 'store' */
43

54
// const debug = makeDebugger('L:sidebar')
@@ -35,20 +34,12 @@ export const pin = () => store.markState({ pin: !store.pin })
3534
export function extendMenuBar(communityRaw) {
3635
switch (communityRaw) {
3736
case ROUTE.COMMUNITIES: {
38-
return Router.push({
39-
pathname: `/${ROUTE.COMMUNITIES}`,
40-
asPath: `/${communityRaw}/`,
41-
})
37+
return store.markRoute({ mainPath: ROUTE.COMMUNITIES, subPath: 'index' })
4238
}
4339
case ROUTE.USERS: {
44-
return Router.push(`/${ROUTE.USERS}`, `/${communityRaw}/`)
40+
return store.markRoute({ mainPath: ROUTE.USERS, subPath: 'index' })
4541
}
4642
default: {
47-
/*
48-
const asPath = `/${communityRaw}/${ROUTE.POSTS}`
49-
Router.push('/', asPath)
50-
*/
51-
5243
onRootMenuSelect(communityRaw, ROUTE.POSTS)
5344
return loadCommunity(communityRaw)
5445
}

0 commit comments

Comments
 (0)