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.

Commitb6a1ee0

Browse files
authored
refactor: single thread for pages (#1394)
1 parenteab4e48 commitb6a1ee0

File tree

15 files changed

+1033
-36
lines changed

15 files changed

+1033
-36
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* CommunityContent
3+
*/
4+
5+
import{FC}from'react'
6+
import{isMobile}from'react-device-detect'
7+
8+
import{bond}from'@/utils/mobx'
9+
10+
importCommunityDigestfrom'@/containers/digest/CommunityDigest'
11+
importAboutThreadfrom'@/containers/thread/AboutThread'
12+
13+
importtype{TStore}from'./store'
14+
import{useInit}from'./logic'
15+
16+
import{
17+
Wrapper,
18+
InnerWrapper,
19+
ContentWrapper,
20+
MobileCardsWrapper,
21+
}from'./styles'
22+
23+
typeTProps={
24+
communityContent?:TStore
25+
}
26+
27+
/**
28+
* only for AboutThread, but link to the common communityContent store
29+
*/
30+
constCommunityContentContainer:FC<TProps>=({communityContent:store})=>{
31+
useInit(store)
32+
33+
return(
34+
<Wrappertestid="about-thread-content">
35+
<CommunityDigest/>
36+
{isMobile ?(
37+
<MobileCardsWrapper>
38+
<ContentWrapper>
39+
<AboutThread/>
40+
</ContentWrapper>
41+
</MobileCardsWrapper>
42+
) :(
43+
<InnerWrapper>
44+
<ContentWrapper>
45+
<AboutThread/>
46+
</ContentWrapper>
47+
</InnerWrapper>
48+
)}
49+
</Wrapper>
50+
)
51+
}
52+
53+
exportdefaultbond(CommunityContentContainer,'communityContent')asFC<TProps>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* CommunityContent
3+
*/
4+
5+
import{FC}from'react'
6+
import{isMobile}from'react-device-detect'
7+
8+
import{bond}from'@/utils/mobx'
9+
10+
importCommunityDigestfrom'@/containers/digest/CommunityDigest'
11+
importChangelogThreadfrom'@/containers/thread/ChangelogThread'
12+
13+
importtype{TStore}from'./store'
14+
import{useInit}from'./logic'
15+
16+
import{
17+
Wrapper,
18+
InnerWrapper,
19+
ContentWrapper,
20+
MobileCardsWrapper,
21+
}from'./styles'
22+
23+
typeTProps={
24+
communityContent?:TStore
25+
}
26+
27+
/**
28+
* only for AboutThread, but link to the common communityContent store
29+
*/
30+
constCommunityContentContainer:FC<TProps>=({communityContent:store})=>{
31+
useInit(store)
32+
33+
return(
34+
<Wrappertestid="changelog-thread-content">
35+
<CommunityDigest/>
36+
{isMobile ?(
37+
<MobileCardsWrapper>
38+
<ContentWrapper>
39+
<ChangelogThread/>
40+
</ContentWrapper>
41+
</MobileCardsWrapper>
42+
) :(
43+
<InnerWrapper>
44+
<ContentWrapper>
45+
<ChangelogThread/>
46+
</ContentWrapper>
47+
</InnerWrapper>
48+
)}
49+
</Wrapper>
50+
)
51+
}
52+
53+
exportdefaultbond(CommunityContentContainer,'communityContent')asFC<TProps>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* CommunityContent
3+
*/
4+
5+
import{FC}from'react'
6+
import{isMobile}from'react-device-detect'
7+
8+
import{bond}from'@/utils/mobx'
9+
10+
importCommunityDigestfrom'@/containers/digest/CommunityDigest'
11+
importDashboardThreadfrom'@/containers//thread/DashboardThread'
12+
13+
importtype{TStore}from'./store'
14+
import{useInit}from'./logic'
15+
16+
import{
17+
Wrapper,
18+
InnerWrapper,
19+
ContentWrapper,
20+
MobileCardsWrapper,
21+
}from'./styles'
22+
23+
typeTProps={
24+
communityContent?:TStore
25+
}
26+
27+
/**
28+
* only for AboutThread, but link to the common communityContent store
29+
*/
30+
constCommunityContentContainer:FC<TProps>=({communityContent:store})=>{
31+
useInit(store)
32+
33+
return(
34+
<Wrappertestid="dashboard-thread-content">
35+
<CommunityDigest/>
36+
{isMobile ?(
37+
<MobileCardsWrapper>
38+
<ContentWrapper>
39+
<DashboardThread/>
40+
</ContentWrapper>
41+
</MobileCardsWrapper>
42+
) :(
43+
<InnerWrapper>
44+
<ContentWrapper>
45+
<DashboardThread/>
46+
</ContentWrapper>
47+
</InnerWrapper>
48+
)}
49+
</Wrapper>
50+
)
51+
}
52+
53+
exportdefaultbond(CommunityContentContainer,'communityContent')asFC<TProps>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* CommunityContent
3+
*/
4+
5+
import{FC}from'react'
6+
import{isMobile}from'react-device-detect'
7+
8+
import{bond}from'@/utils/mobx'
9+
10+
importCommunityDigestfrom'@/containers/digest/CommunityDigest'
11+
importHelpThreadfrom'@/containers//thread/HelpThread'
12+
13+
importtype{TStore}from'./store'
14+
import{useInit}from'./logic'
15+
16+
import{
17+
Wrapper,
18+
InnerWrapper,
19+
ContentWrapper,
20+
MobileCardsWrapper,
21+
}from'./styles'
22+
23+
typeTProps={
24+
communityContent?:TStore
25+
}
26+
27+
/**
28+
* only for AboutThread, but link to the common communityContent store
29+
*/
30+
constCommunityContentContainer:FC<TProps>=({communityContent:store})=>{
31+
useInit(store)
32+
33+
return(
34+
<Wrappertestid="help-thread-content">
35+
<CommunityDigest/>
36+
{isMobile ?(
37+
<MobileCardsWrapper>
38+
<ContentWrapper>
39+
<HelpThread/>
40+
</ContentWrapper>
41+
</MobileCardsWrapper>
42+
) :(
43+
<InnerWrapper>
44+
<ContentWrapper>
45+
<HelpThread/>
46+
</ContentWrapper>
47+
</InnerWrapper>
48+
)}
49+
</Wrapper>
50+
)
51+
}
52+
53+
exportdefaultbond(CommunityContentContainer,'communityContent')asFC<TProps>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* CommunityContent
3+
*/
4+
5+
import{FC}from'react'
6+
import{isMobile}from'react-device-detect'
7+
8+
import{bond}from'@/utils/mobx'
9+
10+
importCommunityDigestfrom'@/containers/digest/CommunityDigest'
11+
importKanbanThreadfrom'@/containers//thread/KanbanThread'
12+
13+
importtype{TStore}from'./store'
14+
import{useInit}from'./logic'
15+
16+
import{
17+
Wrapper,
18+
InnerWrapper,
19+
ContentWrapper,
20+
MobileCardsWrapper,
21+
}from'./styles'
22+
23+
typeTProps={
24+
communityContent?:TStore
25+
}
26+
27+
/**
28+
* only for AboutThread, but link to the common communityContent store
29+
*/
30+
constCommunityContentContainer:FC<TProps>=({communityContent:store})=>{
31+
useInit(store)
32+
33+
return(
34+
<Wrappertestid="kanban-thread-content">
35+
<CommunityDigest/>
36+
{isMobile ?(
37+
<MobileCardsWrapper>
38+
<ContentWrapper>
39+
<KanbanThread/>
40+
</ContentWrapper>
41+
</MobileCardsWrapper>
42+
) :(
43+
<InnerWrapper>
44+
<ContentWrapper>
45+
<KanbanThread/>
46+
</ContentWrapper>
47+
</InnerWrapper>
48+
)}
49+
</Wrapper>
50+
)
51+
}
52+
53+
exportdefaultbond(CommunityContentContainer,'communityContent')asFC<TProps>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* CommunityContent
3+
*/
4+
5+
import{FC}from'react'
6+
import{isMobile}from'react-device-detect'
7+
8+
import{bond}from'@/utils/mobx'
9+
10+
importCommunityDigestfrom'@/containers/digest/CommunityDigest'
11+
importArticlesThreadfrom'@/containers//thread/ArticlesThread'
12+
13+
importtype{TStore}from'./store'
14+
import{useInit}from'./logic'
15+
16+
import{
17+
Wrapper,
18+
InnerWrapper,
19+
ContentWrapper,
20+
MobileCardsWrapper,
21+
}from'./styles'
22+
23+
typeTProps={
24+
communityContent?:TStore
25+
}
26+
27+
/**
28+
* only for AboutThread, but link to the common communityContent store
29+
*/
30+
constCommunityContentContainer:FC<TProps>=({communityContent:store})=>{
31+
useInit(store)
32+
33+
return(
34+
<Wrappertestid="post-thread-content">
35+
<CommunityDigest/>
36+
{isMobile ?(
37+
<MobileCardsWrapper>
38+
<ContentWrapper>
39+
<ArticlesThread/>
40+
</ContentWrapper>
41+
</MobileCardsWrapper>
42+
) :(
43+
<InnerWrapper>
44+
<ContentWrapper>
45+
<ArticlesThread/>
46+
</ContentWrapper>
47+
</InnerWrapper>
48+
)}
49+
</Wrapper>
50+
)
51+
}
52+
53+
exportdefaultbond(CommunityContentContainer,'communityContent')asFC<TProps>

‎src/containers/content/CommunityContent/ThreadContent.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import LavaLampLoading from '@/widgets/Loading/LavaLampLoading'
88

99
importArticlesThreadfrom'@/containers//thread/ArticlesThread'
1010
importKanbanThreadfrom'@/containers//thread/KanbanThread'
11-
importChangeThreadfrom'@/containers//thread/ChangelogThread'
11+
importChangeLogThreadfrom'@/containers//thread/ChangelogThread'
1212
// import ReposThread from '@/containers/thread/ReposThread'
1313
// import CperMapThread from '@/containers/thread/CperMapThread'
1414
// import WipThread from './WipThread'
@@ -45,7 +45,7 @@ const ThreadContent: FC<TProps> = ({ thread }) => {
4545
}
4646

4747
caseTHREAD.CHANGELOG:{
48-
return<ChangeThread/>
48+
return<ChangeLogThread/>
4949
}
5050

5151
caseTHREAD.HELP:{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp