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

Commit c72eff2

Browse files
committed
Merge branch 'original_community' into dev
2 parents 9955d5f + 7bd3d1b commit c72eff2

File tree

8 files changed

+20
-8
lines changed

8 files changed

+20
-8
lines changed

containers/schemas/pages/job.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ export const job = `
2525
}
2626
totalCount
2727
}
28+
origialCommunity {
29+
${F.community}
30+
}
2831
communities {
2932
${F.community}
3033
}

containers/schemas/pages/post.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ export const post = `
3030
}
3131
totalCount
3232
}
33+
origialCommunity {
34+
${F.community}
35+
}
3336
communities {
3437
${F.community}
3538
}

containers/schemas/pages/repo.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export const repo = `
2323
}
2424
totalCount
2525
}
26+
origialCommunity {
27+
${F.community}
28+
}
2629
communities {
2730
${F.community}
2831
}

containers/schemas/pages/video.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export const video = `
2424
}
2525
totalCount
2626
}
27+
origialCommunity {
28+
${F.community}
29+
}
2730
communities {
2831
${F.community}
2932
}

pages/job.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ export default class Index extends React.Component {
9191
const mainPath = getMainPath(props)
9292
const { sessionState, pagedComments, subscribedCommunities, job } = resp
9393

94-
if (!R.contains(mainPath, R.pluck('raw', job.communities))) {
95-
return { statusCode: 404, target: getSubPath(props) }
96-
}
97-
9894
return {
9995
langSetup: {},
10096
theme: {
@@ -106,7 +102,11 @@ export default class Index extends React.Component {
106102
userSubscribedCommunities: subscribedCommunities,
107103
},
108104
route: { mainPath, subPath: ROUTE.JOB },
109-
viewing: { job, activeThread: THREAD.JOB, community: job.communities[0] },
105+
viewing: {
106+
job,
107+
activeThread: THREAD.JOB,
108+
community: job.origialCommunity,
109+
},
110110
comments: { pagedComments },
111111
}
112112
}

pages/post.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default class Index extends React.Component {
106106
viewing: {
107107
post,
108108
activeThread: THREAD.POST,
109-
community: post.communities[0],
109+
community: post.origialCommunity,
110110
},
111111
comments: { pagedComments },
112112
}

pages/repo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default class Index extends React.Component {
107107
viewing: {
108108
repo,
109109
activeThread: THREAD.REPO,
110-
community: repo.communities[0],
110+
community: repo.origialCommunity,
111111
},
112112
comments: { pagedComments },
113113
}

pages/video.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default class Index extends React.Component {
106106
viewing: {
107107
video,
108108
activeThread: THREAD.VIDEO,
109-
community: video.communities[0],
109+
community: video.origialCommunity,
110110
},
111111
comments: { pagedComments },
112112
}

0 commit comments

Comments
 (0)