diff --git a/src/components/Learningpath/Learningpath.tsx b/src/components/Learningpath/Learningpath.tsx index dfc354bfa2..5e66f83146 100644 --- a/src/components/Learningpath/Learningpath.tsx +++ b/src/components/Learningpath/Learningpath.tsx @@ -176,7 +176,6 @@ const Learningpath = ({ )} { +const LearningpathEmbed = ({ learningpathStep, skipToContentId, subjectId, breadcrumbItems }: Props) => { const { t, i18n } = useTranslation(); const location = useLocation(); const [taxId, articleId] = @@ -178,7 +176,7 @@ const LearningpathEmbed = ({ learningpathStep, skipToContentId, topic, subjectId id={skipToContentId} article={article} oembed={data?.article?.oembed} - {...getArticleProps(resource, topic)} + {...getArticleProps(resource)} > {path ? : <>} @@ -206,13 +204,6 @@ const articleFragment = gql` `; LearningpathEmbed.fragments = { - topic: gql` - fragment LearningpathEmbed_Topic on Topic { - supplementaryResources(subjectId: $subjectId) { - id - } - } - `, article: articleFragment, learningpathStep: gql` fragment LearningpathEmbed_LearningpathStep on LearningpathStep { @@ -254,6 +245,7 @@ const learningpathStepQuery = gql` resource(id: $resourceId) @include(if: $includeResource) { id path + relevanceId resourceTypes { id name diff --git a/src/containers/ArticlePage/ArticlePage.tsx b/src/containers/ArticlePage/ArticlePage.tsx index 38e4533735..d061ce0228 100644 --- a/src/containers/ArticlePage/ArticlePage.tsx +++ b/src/containers/ArticlePage/ArticlePage.tsx @@ -71,7 +71,6 @@ const ArticlePage = ({ const { user, authContextLoaded } = useContext(AuthContext); const { t, i18n } = useTranslation(); const { trackPageView } = useTracker(); - const subjectPageUrl = config.ndlaFrontendDomain; useEffect(() => { if (!loading && authContextLoaded) { @@ -135,32 +134,24 @@ const ArticlePage = ({ const contentType = resource ? getContentType(resource) : undefined; const resourceType = contentType && isHeroContentType(contentType) ? contentType : undefined; - const copyPageUrlLink = topic ? `${subjectPageUrl}${topic.path}/${resource.id.replace("urn:", "")}` : undefined; - const printUrl = `${subjectPageUrl}/article-iframe/${i18n.language}/article/${resource.article.id}`; + const printUrl = `${config.ndlaFrontendDomain}/article-iframe/${i18n.language}/article/${resource.article.id}`; const breadcrumbItems = toBreadcrumbItems(t("breadcrumb.toFrontpage"), [...topicPath, resource]); return (
- + {`${getDocumentTitle(t, resource, subject)}`} {scripts?.map((script) => (