@@ -59,8 +59,8 @@ async function fetchData(props, opt) {
59
59
// schema
60
60
61
61
// utils: filter, tags staff
62
- const { mainPath , subPath :topic } = parseURL ( props )
63
- const community = akaTranslate ( mainPath )
62
+ const { communityPath , subPath :topic } = parseURL ( props )
63
+ const community = akaTranslate ( communityPath )
64
64
const thread = extractThreadFromPath ( props )
65
65
66
66
let filter = addTopicIfNeed (
@@ -105,7 +105,7 @@ async function fetchData(props, opt) {
105
105
106
106
export default class HomePage extends React . Component {
107
107
static async getInitialProps ( props ) {
108
- const { mainPath , subPath } = parseURL ( props )
108
+ const { communityPath , threadPath } = parseURL ( props )
109
109
const thread = extractThreadFromPath ( props )
110
110
111
111
let resp
@@ -117,7 +117,7 @@ export default class HomePage extends React.Component {
117
117
} else {
118
118
return {
119
119
statusCode :404 ,
120
- target :mainPath ,
120
+ target :communityPath ,
121
121
viewing :{ community :{ } } ,
122
122
route :{ } ,
123
123
}
@@ -154,7 +154,12 @@ export default class HomePage extends React.Component {
154
154
repo :{ } ,
155
155
user :{ } ,
156
156
} ,
157
- route :{ mainPath :community . raw , subPath} ,
157
+ route :{
158
+ communityPath :community . raw ,
159
+ mainPath :community . raw ,
160
+ threadPath,
161
+ subPath :threadPath ,
162
+ } ,
158
163
tagsBar :{ tags :partialTags } ,
159
164
} ,
160
165
contentsThread
@@ -177,7 +182,7 @@ export default class HomePage extends React.Component {
177
182
viewing :{ community} ,
178
183
route,
179
184
} = this . props
180
- const { mainPath , subPath} = route
185
+ const { communityPath , subPath} = route
181
186
182
187
const seoTitle =
183
188
community . raw === 'home'
@@ -198,7 +203,7 @@ export default class HomePage extends React.Component {
198
203
< React . Fragment >
199
204
< NextSeo
200
205
config = { {
201
- url :`${ SITE_URL } /${ mainPath } /${ subPath } ` ,
206
+ url :`${ SITE_URL } /${ communityPath } /${ subPath } ` ,
202
207
title :seoTitle ,
203
208
description :`${ community . desc } ` ,
204
209
} }