Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit20c0657

Browse files
authored
chore(constant): use HCN stands for 'home' (#1009)
1 parent6a94f78 commit20c0657

File tree

16 files changed

+39
-28
lines changed

16 files changed

+39
-28
lines changed

‎src/components/CommunityFaceLogo/index.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import React from 'react'
88
importTfrom'prop-types'
99
import{isEmpty}from'ramda'
1010

11+
import{HCN}from'@/constant'
1112
import{ICON_BASE}from'@/config'
1213
import{buildLog}from'@/utils'
1314

@@ -17,7 +18,7 @@ import { Logo } from './styles'
1718
constlog=buildLog('c:CommunityFaceLogo:index')
1819

1920
constCommunityFaceLogo=({ noFill, src, raw, loading, className})=>{
20-
if(raw==='home'||isEmpty(src)){
21+
if(raw===HCN||isEmpty(src)){
2122
return(
2223
<Logo
2324
src={`${ICON_BASE}/site_logo.svg`}
@@ -49,7 +50,7 @@ CommunityFaceLogo.propTypes = {
4950

5051
CommunityFaceLogo.defaultProps={
5152
src:'',
52-
raw:'home',
53+
raw:HCN,
5354
noFill:false,
5455
className:'community-facelogo-class',
5556
loading:null,

‎src/components/JobItem/JobInfo.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
importReactfrom'react'
22
importTimeAgofrom'timeago-react'
33

4-
//import {ICON_CMD } from '@/config'
4+
import{HCN}from'@/constant'
55
import{cutFrom}from'@/utils'
66
importInlineCommunitiesfrom'@/components/InlineCommunities'
77
importInlineTagsfrom'@/components/InlineTags'
@@ -46,7 +46,7 @@ const JobInfo = ({
4646
<Header>
4747
<TitleonClick={onPreview}>{cutFrom(title,30)}</Title>
4848
<CommunitiesWrapper>
49-
<InlineCommunitiesdata={communities}show={community==='home'}/>
49+
<InlineCommunitiesdata={communities}show={community===HCN}/>
5050
</CommunitiesWrapper>
5151
</Header>
5252
<MiddleonClick={onPreview}>

‎src/components/PostItem/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
importReactfrom'react'
88
importTfrom'prop-types'
99

10-
import{C11N}from'@/constant'
10+
import{HCN,C11N}from'@/constant'
1111
import{buildLog}from'@/utils'
1212

1313
importArticleItemPrefixLabelfrom'@/components/ArticleItemPrefixLabel'
@@ -99,7 +99,7 @@ PostItem.defaultProps = {
9999
onAuthorSelect:log,
100100
active:{},
101101
cover:'avatar',
102-
community:'home',
102+
community:HCN,
103103
accountInfo:{
104104
isLogin:false,
105105
customization:T.shape({

‎src/components/TabBar/DesktopView/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
importReactfrom'react'
66
importTfrom'prop-types'
77

8-
import{ANCHOR,THREAD,C11N,SIZE}from'@/constant'
8+
import{HCN,ANCHOR,THREAD,C11N,SIZE}from'@/constant'
99
import{buildLog,sortByIndex}from'@/utils'
1010

1111
importNormalViewfrom'./NormalView'
@@ -63,7 +63,7 @@ TabBar.defaultProps = {
6363
active:THREAD.POST,
6464
onChange:log,
6565
layout:C11N.DIGEST,
66-
communityRaw:'home',
66+
communityRaw:HCN,
6767
size:SIZE.MEDIUM,
6868
}
6969

‎src/containers/content/DiscoveryContent/SubscribeBtn.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
importReactfrom'react'
22

33
import{ICON_CMD}from'@/config'
4+
import{HCN}from'@/constant'
45

56
import{Button}from'@/components/Buttons'
67
importTooltipfrom'@/components/Tooltip'
@@ -11,7 +12,7 @@ import { subscribe, unSubscribe } from './logic'
1112

1213
constAlreadySubedBtn=({ community})=>(
1314
<>
14-
{community.raw!=='home' ?(
15+
{community.raw!==HCN ?(
1516
<Tooltip
1617
content={
1718
<Hintertitle="退出"desc="之后该社区将不会出现在左侧订阅列表中"/>

‎src/containers/content/RecipesContent/Snippets/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
importReactfrom'react'
88

9-
import{GALLERY}from'@/constant'
9+
import{HCN,GALLERY}from'@/constant'
1010

1111
importPagifrom'@/components/Pagi'
1212
import{PagiOptionSwitcher}from'@/components/Switcher'
@@ -73,7 +73,7 @@ const Content = ({ galleryType }) => {
7373
}
7474

7575
Content.getInitialProps=async()=>({
76-
namespacesRequired:['home'],
76+
namespacesRequired:[HCN],
7777
})
7878

7979
exportdefaultReact.memo(Content)

‎src/containers/digest/CommunityDigest/DigestView/ColumnView/index.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { contains } from 'ramda'
33
import{Waypoint}from'react-waypoint'
44

55
import{ICON_CMD}from'@/config'
6-
import{NON_FILL_COMMUNITY}from'@/constant'
6+
import{HCN,NON_FILL_COMMUNITY}from'@/constant'
77
import{useDevice}from'@/hooks'
88

99
importVerifiedSignfrom'@/components/VerifiedSign'
@@ -40,7 +40,7 @@ import {
4040
constCommunityLogoHolder=`${ICON_CMD}/community_logo_holder.svg`
4141

4242
// 没有各种外链接,打赏信息等的官方社区
43-
constNON_STANDARD_COMMUNITIES=['home','feedback']
43+
constNON_STANDARD_COMMUNITIES=[HCN,'feedback']
4444

4545
constCommunityBrief=({ content, descExpand})=>{
4646
return(
@@ -67,7 +67,7 @@ const CommunityBrief = ({ content, descExpand }) => {
6767
</TitleWrapper>
6868
{/* <Desc>{content.desc}</Desc> */}
6969
<ExpandTextsdescExpand={descExpand}/>
70-
{content.raw!=='home'&&<SocialList/>}
70+
{content.raw!==HCN&&<SocialList/>}
7171
</CommunityInfo>
7272
</CommunityWrapper>
7373
)

‎src/containers/digest/CommunityDigest/DigestView/RowView/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
importReactfrom'react'
22
import{contains}from'ramda'
33

4-
import{THREAD,NON_FILL_COMMUNITY,VIEW}from'@/constant'
4+
import{HCN,THREAD,NON_FILL_COMMUNITY,VIEW}from'@/constant'
55
import{ICON_CMD}from'@/config'
66

77
importCustomScrollerfrom'@/components/CustomScroller'
@@ -47,7 +47,7 @@ import { tabOnChange } from '../../logic'
4747
constCommunityLogoHolder=`${ICON_CMD}/community_logo_holder.svg`
4848

4949
// 没有各种外链接,打赏信息等的官方社区
50-
constNON_STANDARD_COMMUNITIES=['home','feedback']
50+
constNON_STANDARD_COMMUNITIES=[HCN,'feedback']
5151

5252
constCommunityBrief=({ content, descExpand})=>{
5353
return(

‎src/containers/digest/CommunityDigest/styles/digest_view/column_view/index.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
importstyledfrom'styled-components'
22

3+
import{HCN}from'@/constant'
34
import{theme,css,WIDTH}from'@/utils'
45

56
importImgfrom'@/Img'
@@ -73,10 +74,10 @@ export const LogoWrapper = styled.div`
7374
position: relative;
7475
width: 55px;
7576
/* TODO: use new logo */
76-
margin-top:${({ raw})=>(raw==='home' ?'-10px' :0)};
77+
margin-top:${({ raw})=>(raw===HCN ?'-10px' :0)};
7778
7879
@media (max-height: 800px) {
79-
margin-top:${({ raw})=>(raw==='home' ?'-8px' :0)};
80+
margin-top:${({ raw})=>(raw===HCN ?'-8px' :0)};
8081
}
8182
8283
${css.media.mobile`

‎src/containers/thread/JobsThread/logic.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import{useEffect}from'react'
22
import{merge,pickBy}from'ramda'
33

4-
import{TYPE,EVENT,ERR,THREAD,ROUTE}from'@/constant'
4+
import{HCN,TYPE,EVENT,ERR,THREAD,ROUTE}from'@/constant'
55
import{
66
asyncSuit,
77
buildLog,
@@ -86,7 +86,7 @@ export const onPreview = (data) => {
8686
exportconstonContentCreate=()=>{
8787
if(!store.isLogin)returnstore.authWarning()
8888

89-
if(store.curCommunity.raw==='home'){
89+
if(store.curCommunity.raw===HCN){
9090
returnstore.mark({showPublishNote:true})
9191
}
9292

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp