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

Commit b4e4394

Browse files
committed
refactor(constant): mv c11n to constant, rm old constants.js
1 parent 3973269 commit b4e4394

File tree

12 files changed

+26
-272
lines changed

12 files changed

+26
-272
lines changed

components/ContentFilter/SettingMenu.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import React from 'react'
22
import R from 'ramda'
33

44
import { ICON_CMD } from '@config'
5-
import { THREAD } from '@constant'
6-
import { C11N } from '@utils'
5+
import { THREAD, C11N } from '@constant'
76

87
import {
98
Wrapper,

components/ContentFilter/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import React from 'react'
88
import T from 'prop-types'
99
import R from 'ramda'
1010

11-
import { THREAD } from '@constant'
12-
import { buildLog, C11N } from '@utils'
11+
import { THREAD, C11N } from '@constant'
12+
import { buildLog } from '@utils'
1313

1414
import FilterButton from './FilterButton'
1515
import SelectedTags from './SelectedTags'

components/JobItem/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
import React from 'react'
88
import T from 'prop-types'
99

10-
import { buildLog, C11N } from '@utils'
10+
import { C11N } from '@constant'
11+
import { buildLog } from '@utils'
1112

1213
import ArticleItemPrefixLabel from '@components/ArticleItemPrefixLabel'
1314
import DigestView from './DigestView'

components/Navigator/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import React from 'react'
88
import T from 'prop-types'
99
import R from 'ramda'
1010

11-
import { ROUTE } from '@constant'
12-
import { buildLog, C11N } from '@utils'
11+
import { ROUTE, C11N } from '@constant'
12+
import { buildLog } from '@utils'
1313

1414
import DigestView from './DigestView'
1515
import BriefView from './BriefView'

components/PagedContents/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
import React from 'react'
88
import T from 'prop-types'
99

10-
import { TYPE, THREAD } from '@constant'
11-
import { buildLog, C11N } from '@utils'
10+
import { TYPE, THREAD, C11N } from '@constant'
11+
import { buildLog } from '@utils'
12+
1213
import Pagi from '@components/Pagi'
1314
import ContentList from './ContentList'
1415

components/PostItem/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
import React from 'react'
88
import T from 'prop-types'
99

10-
import { buildLog, C11N } from '@utils'
11-
import ArticleItemPrefixLabel from '@components/ArticleItemPrefixLabel'
10+
import { C11N } from '@constant'
11+
import { buildLog } from '@utils'
1212

13+
import ArticleItemPrefixLabel from '@components/ArticleItemPrefixLabel'
1314
import DigestView from './DigestView'
1415
import ListView from './ListView'
1516

containers/UserSettings/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { Radio } from 'antd'
99
import 'antd/lib/radio/style/index.css'
1010

1111
import { ICON_CMD, ISSUE_ADDR } from '@config'
12-
import { connectStore, buildLog, C11N } from '@utils'
12+
import { C11N } from '@constant'
13+
import { connectStore, buildLog } from '@utils'
1314

1415
import ThemeSelector from '@components/ThemeSelector'
1516
import Popover from '@components/Popover'

stores/SharedModel/User.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { types as t } from 'mobx-state-tree'
2+
23
import { PAGE_SIZE } from '@config'
3-
import { C11N } from '@utils'
4+
import { C11N } from '@constant'
5+
46
import { Community /* PagedCommunities */ } from './Community'
57

68
const PagedCommunities = t.model('pagedCommunities', {

utils/constant/c11n.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const C11N = {
2+
DIGEST: 'digest',
3+
LIST: 'list',
4+
BRIEF: 'brief',
5+
}
6+
7+
export default C11N

utils/constant/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export { THREAD, COMMUNITY_SPEC_THREADS } from './thread'
77
export { default as USER_THREAD } from './user_thread'
88
export { default as FILTER } from './filter'
99
export { default as ACTION } from './action'
10+
export { default as C11N } from './c11n'
1011

1112
export { PAYMENT_USAGE, PAYMENT_METHOD } from './payment'
1213

0 commit comments

Comments
 (0)