@@ -71,7 +71,6 @@ const ArticlePage = ({
71
71
const { user, authContextLoaded } = useContext ( AuthContext ) ;
72
72
const { t, i18n } = useTranslation ( ) ;
73
73
const { trackPageView } = useTracker ( ) ;
74
- const subjectPageUrl = config . ndlaFrontendDomain ;
75
74
76
75
useEffect ( ( ) => {
77
76
if ( ! loading && authContextLoaded ) {
@@ -135,32 +134,24 @@ const ArticlePage = ({
135
134
const contentType = resource ? getContentType ( resource ) : undefined ;
136
135
const resourceType = contentType && isHeroContentType ( contentType ) ? contentType : undefined ;
137
136
138
- const copyPageUrlLink = topic ? `${ subjectPageUrl } ${ topic . path } /${ resource . id . replace ( "urn:" , "" ) } ` : undefined ;
139
- const printUrl = `${ subjectPageUrl } /article-iframe/${ i18n . language } /article/${ resource . article . id } ` ;
137
+ const printUrl = `${ config . ndlaFrontendDomain } /article-iframe/${ i18n . language } /article/${ resource . article . id } ` ;
140
138
141
139
const breadcrumbItems = toBreadcrumbItems ( t ( "breadcrumb.toFrontpage" ) , [ ...topicPath , resource ] ) ;
142
140
143
141
return (
144
142
< main >
145
- < ArticleHero
146
- subject = { subject }
147
- resourceType = { resourceType }
148
- metaImage = { article . metaImage }
149
- breadcrumbItems = { breadcrumbItems }
150
- />
143
+ < ArticleHero resourceType = { resourceType } metaImage = { article . metaImage } breadcrumbItems = { breadcrumbItems } />
151
144
< Helmet >
152
145
< title > { `${ getDocumentTitle ( t , resource , subject ) } ` } </ title >
153
146
{ scripts ?. map ( ( script ) => (
154
147
< script key = { script . src } src = { script . src } type = { script . type } async = { script . async } defer = { script . defer } />
155
148
) ) }
156
- { copyPageUrlLink && (
157
- < link
158
- rel = "alternate"
159
- type = "application/json+oembed"
160
- href = { `${ config . ndlaFrontendDomain } /oembed?url=${ copyPageUrlLink } ` }
161
- title = { article . title }
162
- />
163
- ) }
149
+ < link
150
+ rel = "alternate"
151
+ type = "application/json+oembed"
152
+ href = { `${ config . ndlaFrontendDomain } /oembed?url=${ config . ndlaFrontendDomain } ${ resource . path } ` }
153
+ title = { article . title }
154
+ />
164
155
{ subject ?. metadata . customFields ?. [ TAXONOMY_CUSTOM_FIELD_SUBJECT_CATEGORY ] ===
165
156
constants . subjectCategories . ARCHIVE_SUBJECTS && < meta name = "robots" content = "noindex, nofollow" /> }
166
157
< meta name = "pageid" content = { `${ article . id } ` } />
@@ -226,9 +217,7 @@ export const articlePageFragments = {
226
217
title
227
218
}
228
219
}
229
- ...ArticleHero_Subject
230
220
}
231
- ${ ArticleHero . fragments . subject }
232
221
` ,
233
222
resource : gql `
234
223
fragment ArticlePage_Resource on Resource {
@@ -256,7 +245,6 @@ export const articlePageFragments = {
256
245
` ,
257
246
topic : gql `
258
247
fragment ArticlePage_Topic on Topic {
259
- path
260
248
...Resources_Topic
261
249
}
262
250
${ Resources . fragments . topic }
0 commit comments