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

Commit 34cfe2a

Browse files
committed
chore: clean up
1 parent 8cab57c commit 34cfe2a

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

components/Navigator/index.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,11 @@ import BriefView from './BriefView'
1616
const debug = makeDebugger('c:Navigator:index')
1717

1818
const Navigator = ({ curCommunity, layout, curRoute }) => {
19+
const { mainPath, subPath } = curRoute
20+
1921
if (
20-
R.contains(curRoute.mainPath, [ROUTE.USER, ROUTE.COMMUNITIES]) ||
21-
R.contains(curRoute.subPath, [
22-
ROUTE.POST,
23-
ROUTE.JOB,
24-
ROUTE.VIDEO,
25-
ROUTE.REPO,
26-
])
22+
R.contains(mainPath, [ROUTE.USER, ROUTE.COMMUNITIES]) ||
23+
R.contains(subPath, [ROUTE.POST, ROUTE.JOB, ROUTE.VIDEO, ROUTE.REPO])
2724
) {
2825
return <DigestView />
2926
}

containers/Doraemon/helper/swissArmyKnife.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import R from 'ramda'
22
import scrollIntoViewIfNeeded from 'scroll-into-view-if-needed'
33

4-
export const lengthE1 = R.compose(R.equals(1), R.length)
5-
export const lengthE2 = R.compose(R.equals(2), R.length)
4+
export const lengthE1 = R.compose(
5+
R.equals(1),
6+
R.length
7+
)
8+
export const lengthE2 = R.compose(
9+
R.equals(2),
10+
R.length
11+
)
612
export const anyNil = R.any(R.isNil)
713

814
export class SwissArmyKnife {

0 commit comments

Comments
 (0)